-
Notifications
You must be signed in to change notification settings - Fork 843
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[EuiPopover] Fix removeEventListener with mismatched capture flag #5437
Conversation
Per MDN: 'Removal of a capturing listener does not affect a non-capturing version of the same listener, and vice versa.'
9368e1b
to
993ecaa
Compare
Preview documentation changes for this PR: https://eui.elastic.co/pr_5437/ |
jenkins test this |
Preview documentation changes for this PR: https://eui.elastic.co/pr_5437/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, @constancecchen!
I did a quick quick JS memory trial to verify cleanup:
After a series of navigation to and away from the popover page:
- The current release continuously increased live memory and never recovered the gain
- The new/fixed version increased live memory but also recovered at each cycle
@thompsongl if you don't mind I'd actually love to see a screencap/video of how you did that! I fiddled a bit in the memory tab of Firefox but got confused 🙈 |
Preview documentation changes for this PR: https://eui.elastic.co/pr_5437/ |
Summary
Per MDN: 'Removal of a capturing listener does not affect a non-capturing version of the same listener, and vice versa.'
closes #5435
This is causing a memory leak for Kibana (elastic/kibana#120251), so we'll likely need to backport this to 7.16 and 8.0
Checklist