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
swistach opened this Issue Feb 4, 2019 · 0 comments

Comments

Projects
None yet
3 participants
@swistach
Copy link
Member

swistach commented Feb 4, 2019

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

@swistach swistach self-assigned this Feb 4, 2019

@swistach swistach 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

swistach added a commit that referenced this issue Feb 6, 2019

swistach added a commit that referenced this issue Feb 7, 2019

swistach added a commit that referenced this issue Feb 11, 2019

swistach added a commit that referenced this issue Feb 11, 2019

swistach added a commit that referenced this issue Feb 12, 2019

swistach added a commit that referenced this issue Feb 12, 2019

swistach added a commit that referenced this issue Feb 12, 2019

swistach added a commit that referenced this issue Feb 18, 2019

swistach added a commit that referenced this issue Feb 18, 2019

swistach added a commit that referenced this issue Feb 19, 2019

ContextMenu's sub-instance shouldn't leave its listeners. (#5789)
* 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 Mar 6, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.