mirror of
https://github.com/facebook/react.git
synced 2025-11-01 09:12:30 +00:00
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.
This commit is contained in:
committed by
GitHub
parent
5166a1b446
commit
95334fada0
@@ -221,6 +221,7 @@ src/renderers/dom/shared/eventPlugins/__tests__/EnterLeaveEventPlugin-test.js
|
||||
* should set relatedTarget properly in iframe
|
||||
|
||||
src/renderers/dom/shared/eventPlugins/__tests__/SelectEventPlugin-test.js
|
||||
* should skip extraction if no listeners are present
|
||||
* should extract if an `onSelect` listener is present
|
||||
|
||||
src/renderers/dom/shared/eventPlugins/__tests__/SimpleEventPlugin-test.js
|
||||
|
||||
@@ -590,9 +590,6 @@ src/renderers/dom/shared/eventPlugins/__tests__/FallbackCompositionState-test.js
|
||||
* extracts when inserted within text
|
||||
* extracts when inserted at end of text
|
||||
|
||||
src/renderers/dom/shared/eventPlugins/__tests__/SelectEventPlugin-test.js
|
||||
* should skip extraction if no listeners are present
|
||||
|
||||
src/renderers/dom/shared/eventPlugins/__tests__/SimpleEventPlugin-test.js
|
||||
* does not add a local click to interactive elements
|
||||
* adds a local click listener to non-interactive elements
|
||||
@@ -744,6 +741,7 @@ src/renderers/native/__tests__/ReactNativeEvents-test.js
|
||||
src/renderers/native/__tests__/ReactNativeMount-test.js
|
||||
* should be able to create and render a native component
|
||||
* should be able to create and update a native component
|
||||
* should be able to create and update a native component
|
||||
|
||||
src/renderers/shared/__tests__/ReactDebugTool-test.js
|
||||
* should add and remove hooks
|
||||
|
||||
Reference in New Issue
Block a user