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 Sebastian Malton committed 2022-11-07 11:31:14 -05:00
1 parent 3152fa26e4
commit 981d74d0df
1 file changed
+2
+2
View File
@@ -126,6 +126,8 @@ export class Menu extends React.Component<MenuProps, 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) {