mirror of
https://github.com/zoriya/react-native-web.git
synced 2026-05-16 12:20:15 +00:00
committed by
Nicolas Gallagher
parent
75c5a90563
commit
b8283245cf
@@ -133,6 +133,7 @@ to return true:wantsResponderID| |
|
||||
|
||||
import type { ResponderEvent } from './createResponderEvent';
|
||||
|
||||
import { canUseDOM } from 'fbjs/lib/ExecutionEnvironment';
|
||||
import createResponderEvent from './createResponderEvent';
|
||||
import {
|
||||
isCancelish,
|
||||
@@ -580,7 +581,7 @@ const documentEventsBubblePhase = [
|
||||
'selectionchange'
|
||||
];
|
||||
export function attachListeners() {
|
||||
if (window.__reactResponderSystemActive == null) {
|
||||
if (canUseDOM && window.__reactResponderSystemActive == null) {
|
||||
window.addEventListener('blur', eventListener);
|
||||
documentEventsBubblePhase.forEach(eventType => {
|
||||
document.addEventListener(eventType, eventListener);
|
||||
|
||||
Reference in New Issue
Block a user