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

Function handleClickOutside

packages/editor-app/src/components/ContextMenu.tsx:253–257  ·  view source on GitHub ↗
(e: MouseEvent)

Source from the content-addressed store, hash-verified

251 // 点击外部关闭 | Close on click outside
252 useEffect(() => {
253 const handleClickOutside = (e: MouseEvent) => {
254 if (menuRef.current && !menuRef.current.contains(e.target as Node)) {
255 onClose();
256 }
257 };
258
259 const handleEscape = (e: KeyboardEvent) => {
260 if (e.key === 'Escape') {

Callers

nothing calls this directly

Calls 1

containsMethod · 0.45

Tested by

no test coverage detected