Skip to content

Delegated event handlers for components fix#75

Open
michielvermeir wants to merge 7 commits into
masterfrom
bugfix/event-delegation
Open

Delegated event handlers for components fix#75
michielvermeir wants to merge 7 commits into
masterfrom
bugfix/event-delegation

Conversation

@michielvermeir

Copy link
Copy Markdown
Contributor

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.

Michiel Vermeir 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.

@MichaelVyverman MichaelVyverman left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@goranvinterhalter

goranvinterhalter commented Aug 11, 2021

Copy link
Copy Markdown
Contributor

Lol :D

As some time has passed, @basvandenberg can you inspect these changes and check that it works?
It would be nice to have this merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants