Skip to content

Commit 52517c4

Browse files
authored
fix: focus on IE for SVG (#721)
1 parent 1357c16 commit 52517c4

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

packages/base/src/FocusHelper.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -65,12 +65,12 @@ class FocusHelper {
6565

6666
if (child.nodeType === 1 && !FocusHelper.isHidden(child)) {
6767
if (FocusHelper.hasTabIndex(child)) {
68-
return child;
68+
return (child && typeof child.focus === "function") ? child : null;
6969
}
7070

7171
focusableDescendant = FocusHelper.findFocusableElement(child, forward);
7272
if (focusableDescendant) {
73-
return focusableDescendant;
73+
return (focusableDescendant && typeof focusableDescendant.focus === "function") ? focusableDescendant : null;
7474
}
7575
}
7676

packages/main/src/Popup.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -421,7 +421,7 @@ class Popup extends UI5Element {
421421
element = element.shadowRoot.activeElement;
422422
}
423423

424-
this._lastFocusableElement = element;
424+
this._lastFocusableElement = (element && typeof element.focus === "function") ? element : null;
425425
}
426426

427427
resetFocus() {

0 commit comments

Comments
 (0)