MCPcopy Index your code
hub / github.com/alibaba/lowcode-engine / isFormEvent

Function isFormEvent

packages/utils/src/is-form-event.ts:1–14  ·  view source on GitHub ↗
(e: KeyboardEvent | MouseEvent)

Source from the content-addressed store, hash-verified

1export function isFormEvent(e: KeyboardEvent | MouseEvent) {
2 const t = e.target as HTMLFormElement;
3 if (!t) {
4 return false;
5 }
6
7 if (t.form || /^(INPUT|SELECT|TEXTAREA)$/.test(t.tagName)) {
8 return true;
9 }
10 if (t instanceof HTMLElement && /write/.test(window.getComputedStyle(t).getPropertyValue('-webkit-user-modify'))) {
11 return true;
12 }
13 return false;
14}

Callers 3

initFunction · 0.85
TreeViewClass · 0.85
setupDragAndClickMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…