MCPcopy Index your code
hub / github.com/adobe/react-spectrum / isTextInputLike

Function isTextInputLike

packages/dev/s2-docs/src/SearchMenuTrigger.tsx:100–108  ·  view source on GitHub ↗
(el: Element | null)

Source from the content-addressed store, hash-verified

98 useEffect(() => {
99 let isMac = /Mac/.test(navigator.platform);
100 const isTextInputLike = (el: Element | null): boolean => {
101 if (!el) {
102 return false;
103 }
104 let h = el as HTMLElement;
105 return (
106 h.isContentEditable || !!el.closest('input, textarea, [contenteditable], [role="textbox"]')
107 );
108 };
109
110 const handleKeyDown = (e: KeyboardEvent) => {
111 if (e.isComposing) {

Callers 1

handleKeyDownFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected