Skip to content
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

ContextMenu's menu instance causes a listener leak. #5759

Closed
mrpiotr-dev opened this issue Feb 4, 2019 · 0 comments
Closed

ContextMenu's menu instance causes a listener leak. #5759

mrpiotr-dev opened this issue Feb 4, 2019 · 0 comments

Comments

@mrpiotr-dev
Copy link
Contributor

Description

In #4614, we introduced leak of the mousedown listener, mounted onto document.documentElement.

memoryleak_listeners

Steps to reproduce

  1. Go to a demo.
  2. Click several times on the "updateSettings" button.
  3. Click on the "destroy" button.
  4. Check in your favourite dev tools, how many mousedown listeners are still listening on document.documentElement (html node).

TIP: In chrome you can use getEventListeners(document.documentElement).mousedown.
TIP: Be sure you are on a proper frame.

Demo

https://jsfiddle.net/1m8q2fu6/

Your environment

  • Handsontable version: 0.35.0+
  • Browser Name and version: any
  • Operating System: any
@mrpiotr-dev mrpiotr-dev self-assigned this Feb 4, 2019
@mrpiotr-dev mrpiotr-dev changed the title ContextMenu's menu instance causes a listeners leak. ContextMenu's menu instance causes a listener leak. Feb 4, 2019
@wojciechczerniak wojciechczerniak added this to the February 2019 milestone Feb 6, 2019
mrpiotr-dev added a commit that referenced this issue Feb 6, 2019
mrpiotr-dev added a commit that referenced this issue Feb 12, 2019
mrpiotr-dev pushed a commit that referenced this issue Feb 19, 2019
* WIP. Added: new hook - updatePlugin to split responsibility of update plugins from afterUpdateSettings. #5759

* WIP. Changed: updating process of plugins. #5759

* WIP. Creating menuItems list on demand. #5759

* WIP. Reverted changes in autoColumnSize, columnSorting, ganttChart and undoRedo. #5759

* WIP. Builds menu items list on demand - without prepering it previously. #5759

* Changed: itemsFactory in contextMenu builds items list on demand. #5759

* Removed: commented line. #5759

* Changes after CR - updated docs. Added test specs. #5759

* Updated package-lock.json
@AMBudnik AMBudnik closed this as completed Mar 6, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants