dillon1000/react
Commit
Browse files Track if SelectEventPlugin is attached on a per document basis (#8190)
This gets rid of the global flag on if something has listened to onSelect and instead reads the isListening map if all the events are covered. This is required if we want to attach events locally at roots. Could be slower perf wise to handle events. An alternative solution would be to attach a special flag on the listener map for the document so we don't have to check the full dependency list. However, my favorite solution would be to just eagerly attach all event listeners (except maybe wheel). Then we don't have to do any of this stuff on a per element basis.
Changed paths5 files
First-parent comparisonscripts/fiber/tests-failing.txt ModifiedM scripts/fiber/tests-passing.txt ModifiedM src/renderers/dom/shared/ReactBrowserEventEmitter.js ModifiedM src/renderers/dom/shared/eventPlugins/SelectEventPlugin.js ModifiedM src/renderers/dom/shared/eventPlugins/__tests__/SelectEventPlugin-test.js ModifiedPatch
Files changed
Rendering syntax-highlighted changes…