dillon1000/react
Commit
Browse files Propagate events to parent components when nested
When events are captured, the nearest React-rendered ancestor is found and events are propagated to its tree. This causes issues when components are nested as only the innermost component receives the events. This change modifies this behaviour so events propagate all the way up the DOM hierarchy. To reduce the performance cost, this DOM traversal is only done if the component is actually nested (determined by the `containerIsNested` map which is lazily initialised).
Changed paths3 files
First-parent comparisonsrc/core/ReactEventTopLevelCallback.js ModifiedM src/core/ReactMount.js ModifiedA src/core/__tests__/ReactEventTopLevelCallback-test.js AddedPatch
Files changed
Rendering syntax-highlighted changes…