MCPcopy Index your code
hub / github.com/027xiguapi/code-box / handleClick

Function handleClick

component/ui/customDomSelector.tsx:60–75  ·  view source on GitHub ↗
(event: MouseEvent)

Source from the content-addressed store, hash-verified

58 }
59
60 const handleClick = (event: MouseEvent) => {
61 if (isReady) {
62 const target = event.target as HTMLElement
63 const tooltip = target.closest(".codebox-tooltip")
64 const modal = target.closest(".codebox-modal")
65 const csui = target.closest("#codebox-csui")
66
67 if (!tooltip && !modal && !csui) {
68 setIsSelect(true)
69 highlightElement(target)
70 updateTooltipPosition(target)
71 event.stopPropagation()
72 event.preventDefault()
73 }
74 }
75 }
76
77 const highlightElement = (element: HTMLElement) => {
78 removeHighlight()

Callers

nothing calls this directly

Calls 2

highlightElementFunction · 0.85
updateTooltipPositionFunction · 0.85

Tested by

no test coverage detected