Skip to content

Commit f95ff15

Browse files
committed
Use event target doc as getActiveElement context
Depends on facebook/fbjs#188
1 parent 8ec1ae6 commit f95ff15

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/renderers/dom/shared/eventPlugins/SelectEventPlugin.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,9 +107,10 @@ function constructSelectEvent(nativeEvent, nativeEventTarget) {
107107
// selection (this matches native `select` event behavior). In HTML5, select
108108
// fires only on input and textarea thus if there's no focused element we
109109
// won't dispatch.
110+
var doc = nativeEventTarget.ownerDocument || nativeEventTarget.document || nativeEventTarget;
110111
if (mouseDown ||
111112
activeElement == null ||
112-
activeElement !== getActiveElement()) {
113+
activeElement !== getActiveElement(doc)) {
113114
return null;
114115
}
115116

0 commit comments

Comments
 (0)