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 Mar 15, 2017
1 parent 7d4a464 commit f7669f2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/renderers/dom/shared/eventPlugins/SelectEventPlugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,9 @@ 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.
var doc = nativeEventTarget.ownerDocument || nativeEventTarget.document || nativeEventTarget;
if (
mouseDown || activeElement == null || activeElement !== getActiveElement()
mouseDown || activeElement == null || activeElement !== getActiveElement(doc)
) {
return null;
}
Expand Down

0 comments on commit f7669f2

Please sign in to comment.