MCPcopy Create free account
hub / github.com/esengine/esengine / handleClickOutside

Function handleClickOutside

packages/editor-app/src/components/StartupPage.tsx:46–50  ·  view source on GitHub ↗
(e: MouseEvent)

Source from the content-addressed store, hash-verified

44
45 useEffect(() => {
46 const handleClickOutside = (e: MouseEvent) => {
47 if (langMenuRef.current && !langMenuRef.current.contains(e.target as Node)) {
48 setShowLangMenu(false);
49 }
50 };
51 document.addEventListener('mousedown', handleClickOutside);
52 return () => document.removeEventListener('mousedown', handleClickOutside);
53 }, []);

Callers

nothing calls this directly

Calls 1

containsMethod · 0.45

Tested by

no test coverage detected