MCPcopy Create free account
hub / github.com/Acode-Foundation/Acode / handleClick

Function handleClick

src/components/inputhints/index.js:69–82  ·  view source on GitHub ↗

* Handle click event * @param {MouseEvent} e Event

(e)

Source from the content-addressed store, hash-verified

67 * @param {MouseEvent} e Event
68 */
69 function handleClick(e) {
70 const $el = e.target;
71 const action = $el.getAttribute("action");
72 if (action !== "hint") return;
73 const value = $el.getAttribute("value");
74 if (!value) {
75 onblur();
76 return;
77 }
78 $input.value = $el.textContent;
79 if (onSelect) onSelect(value);
80 preventUpdate = false;
81 onblur();
82 }
83
84 /**
85 * Handle keypress event

Callers

nothing calls this directly

Calls 2

onSelectFunction · 0.85
onblurFunction · 0.70

Tested by

no test coverage detected