1
0
mirror of https://github.com/lensapp/lens.git synced 2025-05-20 05:10:56 +00:00

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 2022-11-07 17:54:02 +03:00 committed by GitHub
parent 19aeda0241
commit 82ab60d544
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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) {