MCPcopy
hub / github.com/TanStack/query / onFocus

Function onFocus

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

Source from the content-addressed store, hash-verified

177 // This is to make sure that the font size is updated when the stylesheet is updated
178 // and the user focuses back on the window
179 const onFocus = () => {
180 const root = transitionsContainerRef.parentElement as HTMLElement
181 const fontSize = getComputedStyle(root).fontSize
182 root.style.setProperty('--tsqd-font-size', fontSize)
183 }
184 onFocus()
185 window.addEventListener('focus', onFocus)
186 onCleanup(() => {

Callers 2

DevtoolsFunction · 0.85
listenerMethod · 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…