(event: MouseEvent)
| 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() |
nothing calls this directly
no test coverage detected