Skip to content

Commit

Permalink
fix: focus on IE for SVG (#721)
Browse files Browse the repository at this point in the history
  • Loading branch information
vladitasev committed Aug 9, 2019
1 parent 1357c16 commit 52517c4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions packages/base/src/FocusHelper.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,12 +65,12 @@ class FocusHelper {

if (child.nodeType === 1 && !FocusHelper.isHidden(child)) {
if (FocusHelper.hasTabIndex(child)) {
return child;
return (child && typeof child.focus === "function") ? child : null;
}

focusableDescendant = FocusHelper.findFocusableElement(child, forward);
if (focusableDescendant) {
return focusableDescendant;
return (focusableDescendant && typeof focusableDescendant.focus === "function") ? focusableDescendant : null;
}
}

Expand Down
2 changes: 1 addition & 1 deletion packages/main/src/Popup.js
Original file line number Diff line number Diff line change
Expand Up @@ -421,7 +421,7 @@ class Popup extends UI5Element {
element = element.shadowRoot.activeElement;
}

this._lastFocusableElement = element;
this._lastFocusableElement = (element && typeof element.focus === "function") ? element : null;
}

resetFocus() {
Expand Down

0 comments on commit 52517c4

Please sign in to comment.