MCPcopy Create free account
hub / github.com/ReactTooltip/react-tooltip / onWindowBlur

Function onWindowBlur

src/components/Tooltip/focus-open.ts:58–68  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

56}
57
58function onWindowBlur() {
59 const active = document.activeElement
60 restoredFocusElement =
61 active instanceof Element && active !== document.body && active !== document.documentElement
62 ? active
63 : null
64 if (clearTimer !== null) {
65 clearTimeout(clearTimer)
66 clearTimer = null
67 }
68}
69
70function scheduleClearRestoredFocus() {
71 if (clearTimer !== null) {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected