Repository navigation
Commit a112448
[DOM] Treat omitted Fragment Event listener options same as
`FragmentInstance` tracks its event listeners so they can be applied to
children added later, and matches them by a normalized options identity.
Omitted options currently normalize to a different identity than an
explicit `false` or `{capture: false}`, even though both mean `capture:
false` per the `EventTarget` contract, where listener identity is the
tuple of type, callback, and capture flag. As a result, a listener added
without an options argument cannot be removed with an explicit
capture-false value (or the reverse).
This change normalizes omitted options to the same capture-false
identity as `false` and `{capture: false}`. The first commit adds a test
to the FragmentRef suite characterizing the current behavior; the second
commit contains the fix and the updated assertions.
---------
Co-authored-by: Claude Code (kimi-k3[1m]) <[email protected]>capture: false (#37251)1 parent 3c397fe commit a112448
2 files changed
Lines changed: 42 additions & 1 deletion
File tree
- packages
- react-dom-bindings/src/client
- react-dom/src/__tests__
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3152 | 3152 | | |
3153 | 3153 | | |
3154 | 3154 | | |
3155 | | - | |
| 3155 | + | |
3156 | 3156 | | |
3157 | 3157 | | |
3158 | 3158 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
832 | 832 | | |
833 | 833 | | |
834 | 834 | | |
| 835 | + | |
| 836 | + | |
| 837 | + | |
| 838 | + | |
| 839 | + | |
| 840 | + | |
| 841 | + | |
| 842 | + | |
| 843 | + | |
| 844 | + | |
| 845 | + | |
| 846 | + | |
| 847 | + | |
| 848 | + | |
| 849 | + | |
| 850 | + | |
| 851 | + | |
| 852 | + | |
| 853 | + | |
| 854 | + | |
| 855 | + | |
| 856 | + | |
| 857 | + | |
| 858 | + | |
| 859 | + | |
| 860 | + | |
| 861 | + | |
| 862 | + | |
| 863 | + | |
| 864 | + | |
| 865 | + | |
| 866 | + | |
| 867 | + | |
| 868 | + | |
| 869 | + | |
| 870 | + | |
| 871 | + | |
| 872 | + | |
| 873 | + | |
| 874 | + | |
| 875 | + | |
835 | 876 | | |
836 | 877 | | |
837 | 878 | | |
| |||
0 commit comments