MCPcopy Create free account
hub / github.com/codeaashu/claude-code / adaptClickEvent

Function adaptClickEvent

web/lib/ink-compat/Box.tsx:58–72  ·  view source on GitHub ↗
(e: MouseEvent<HTMLDivElement>)

Source from the content-addressed store, hash-verified

56// ---------------------------------------------------------------------------
57
58function adaptClickEvent(e: MouseEvent<HTMLDivElement>): WebClickEvent {
59 let stopped = false
60 const shim: WebClickEvent = {
61 x: e.clientX,
62 y: e.clientY,
63 button: e.button === 2 ? 'right' : e.button === 1 ? 'middle' : 'left',
64 stopImmediatePropagation() {
65 if (!stopped) {
66 stopped = true
67 e.stopPropagation()
68 }
69 },
70 }
71 return shim
72}
73
74function adaptFocusEvent(e: React.FocusEvent<HTMLDivElement>): WebFocusEvent {
75 return {

Callers 1

Box.tsxFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected