Skip to content

Commit 501e1f8

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

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
@@ -110,9 +110,10 @@ function constructSelectEvent(nativeEvent, nativeEventTarget) {
110110
// selection (this matches native `select` event behavior). In HTML5, select
111111
// fires only on input and textarea thus if there's no focused element we
112112
// won't dispatch.
113+
var doc = nativeEventTarget.ownerDocument || nativeEventTarget.document || nativeEventTarget;
113114
if (mouseDown ||
114115
activeElement == null ||
115-
activeElement !== getActiveElement()) {
116+
activeElement !== getActiveElement(doc)) {
116117
return null;
117118
}
118119

0 commit comments

Comments
 (0)