We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1457ded commit bea378aCopy full SHA for bea378a
packages/@react-aria/interactions/src/useFocusVisible.ts
@@ -123,7 +123,7 @@ function handleWindowBlur() {
123
* Setup global event listeners to control when keyboard focus style should be visible.
124
*/
125
function setupGlobalFocusEvents(element?: HTMLElement | null) {
126
- if (typeof window === 'undefined' || hasSetupGlobalListeners.get(getOwnerWindow(element))) {
+ if (typeof window === 'undefined' || typeof document === 'undefined' || hasSetupGlobalListeners.get(getOwnerWindow(element))) {
127
return;
128
}
129
0 commit comments