MCPcopy Create free account
hub / github.com/TanStack/query / onFocus

Function onFocus

packages/query-devtools/src/Devtools.tsx:249–253  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

247 // This is to make sure that the font size is updated when the stylesheet is updated
248 // and the user focuses back on the window
249 const onFocus = () => {
250 const root = transitionsContainerRef.parentElement as HTMLElement
251 const fontSize = getComputedStyle(root).fontSize
252 root.style.setProperty('--tsqd-font-size', fontSize)
253 }
254 onFocus()
255 window.addEventListener('focus', onFocus)
256 onCleanup(() => {

Callers 2

DevtoolsFunction · 0.85
listenerMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected