dillon1000/react
Commit
Browse files Only call put/deleteListener with truthy listeners
Without this, transitioning from `<div onClick={null} />` to `<div />` triggered `willDeleteListener` to delete the `click` handler which caused problems; now, we only call `putListener` and `deleteListener` when we have an actual listener.
I now also clean up the `onClickListeners` map upon deletion and don't double-listen when updating the event listener.Changed paths4 files
First-parent comparisonsrc/browser/eventPlugins/SimpleEventPlugin.js ModifiedM src/browser/ui/ReactDOMComponent.js ModifiedM src/browser/ui/__tests__/ReactDOMComponent-test.js ModifiedM src/event/EventPluginHub.js ModifiedPatch
Files changed
Rendering syntax-highlighted changes…