iVis-at-Bilkent / cytoscape.js-context-menus

A Cytoscape.js extension to provide context menu around elements and core instance
MIT License
86 stars 41 forks source link

Fix memory leak connected with eventListener #58

Closed pmierkowski closed 3 years ago

pmierkowski commented 3 years ago

In file cytoscape-context-menus.js in line 99 there is added listener to document element: document.addEventListener('mouseup', onClick) but in the line 189 listener was removed from document.body element document.body.removeEventListener('mouseup', getScratchProp('hideOnNonCyClick')) which cause memory leaks in Angular 10 pomimo despite of use destroy.

ugurdogrusoz commented 3 years ago

@pmierkowski You should be making changes off of the latest on "unstable" branch. Thanks

pmierkowski commented 3 years ago

@ugurdogrusoz My fault. Sorry. Now should be good: https://github.com/iVis-at-Bilkent/cytoscape.js-context-menus/pull/59