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

Function onFocus

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

Source from the content-addressed store, hash-verified

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

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