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

Function onFocus

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

Source from the content-addressed store, hash-verified

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

Callers 2

DevtoolsFunction · 0.85
listenerMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected