Fix for Menu component memory leak (#6526)

Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>

Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
This commit is contained in:
Alex Andreev authored and GitHub committed 2022-11-07 09:54:02 -05:00
1 parent 19aeda0241
commit 82ab60d544
1 file changed
+2
+2
View File
@@ -136,6 +136,8 @@ class NonInjectedMenu extends React.Component<MenuProps & Dependencies, State> {
window.removeEventListener("resize", this.onWindowResize);
window.removeEventListener("click", this.onClickOutside, true);
window.removeEventListener("scroll", this.onScrollOutside, true);
window.removeEventListener("blur", this.onBlur, true);
window.removeEventListener("contextmenu", this.onContextMenu, true);
}
componentDidUpdate(prevProps: MenuProps) {