Skip to content

Commit

Permalink
Use event target doc as getActiveElement context
Browse files Browse the repository at this point in the history
  • Loading branch information
acusti committed May 4, 2017
1 parent 8ec5be5 commit 7896727
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/renderers/dom/client/eventPlugins/SelectEventPlugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -102,9 +102,12 @@ function constructSelectEvent(nativeEvent, nativeEventTarget) {
// selection (this matches native `select` event behavior). In HTML5, select
// fires only on input and textarea thus if there's no focused element we
// won't dispatch.
if (mouseDown ||
activeElement == null ||
activeElement !== getActiveElement()) {
var doc = nativeEventTarget.ownerDocument || nativeEventTarget.document || nativeEventTarget;
if (
mouseDown ||
activeElement == null ||
activeElement !== getActiveElement(doc)
) {
return null;
}

Expand Down

0 comments on commit 7896727

Please sign in to comment.