Skip to content

Commit

Permalink
Check activeDescendantEl exists to focus or not this element.
Browse files Browse the repository at this point in the history
  • Loading branch information
antoniopol06 committed May 11, 2017
1 parent 44b62ee commit 1b9a014
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/ui/react/src/components/base/widget-focus-manager.js
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@
// in case of keyboard navigation, because the focused element might be not the first button,
// but the div element, which contains the button.
if (document.activeElement !== activeDescendantEl && !this.props.focusFirstChild) {
if (this._descendants.indexOf(document.activeElement) === -1) {
if (activeDescendantEl && this._descendants.indexOf(document.activeElement) === -1) {
activeDescendantEl.focus();
}
}
Expand Down

0 comments on commit 1b9a014

Please sign in to comment.