Delegated event handlers for components fix#75
Open
michielvermeir wants to merge 7 commits into
Open
Conversation
added 7 commits
December 18, 2019 15:15
* Commented stylesheet rules * Removed unneccessary prefixes
According to caniuse (https://caniuse.com/#search=Blob) Blob is fully supported by all browsers including IE10+. This removes the need to polyfill this library.
This fixes a bug where event handlers like `onClick` were being attached multiple times in succession. This is now fixed by first removing previous event listeners before reattaching them.
Contributor
|
Lol :D As some time has passed, @basvandenberg can you inspect these changes and check that it works? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Delegated event handlers like
<div onClick={...}></div>were being attached multiple times over the life cycle of a component, causing the call back function to be fired just as many times. The delegated event handlers are now first being removed for their targets before new event handlers are attached.