MCPcopy Create free account
hub / github.com/dailydotdev/apps / onFocus

Function onFocus

packages/shared/src/components/shell/ShellBlock.tsx:375–380  ·  view source on GitHub ↗
(event: FocusEvent)

Source from the content-addressed store, hash-verified

373
374 useEffect(() => {
375 const onFocus = (event: FocusEvent) => {
376 const target = event.target as HTMLElement | null;
377 if (target?.matches?.('input, textarea, [contenteditable="true"]')) {
378 revealShell();
379 }
380 };
381 document.addEventListener('focusin', onFocus);
382 return () => document.removeEventListener('focusin', onFocus);
383 }, []);

Callers 5

ShellFieldFunction · 0.70
PostsSearchFunction · 0.50
handleClickFunction · 0.50
SearchField.tsxFile · 0.50
RichTextEditorComponentFunction · 0.50

Calls 1

revealShellFunction · 0.90

Tested by

no test coverage detected