Web:Common:Add close InfoPanel for unmounting a component.
This commit is contained in:
parent
b4791418b7
commit
36798c4241
@ -153,7 +153,10 @@ const InfoPanel = ({
|
||||
if (!isDesktop() && isVisible) closeInfoPanel();
|
||||
};
|
||||
|
||||
return () => document.removeEventListener("mousedown", onMouseDown);
|
||||
return () => {
|
||||
document.removeEventListener("mousedown", onMouseDown);
|
||||
closeInfoPanel();
|
||||
};
|
||||
}, []);
|
||||
|
||||
return (
|
||||
|
Loading…
Reference in New Issue
Block a user