File tree 2 files changed +3
-3
lines changed
2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -65,12 +65,12 @@ class FocusHelper {
65
65
66
66
if ( child . nodeType === 1 && ! FocusHelper . isHidden ( child ) ) {
67
67
if ( FocusHelper . hasTabIndex ( child ) ) {
68
- return child ;
68
+ return ( child && typeof child . focus === "function" ) ? child : null ;
69
69
}
70
70
71
71
focusableDescendant = FocusHelper . findFocusableElement ( child , forward ) ;
72
72
if ( focusableDescendant ) {
73
- return focusableDescendant ;
73
+ return ( focusableDescendant && typeof focusableDescendant . focus === "function" ) ? focusableDescendant : null ;
74
74
}
75
75
}
76
76
Original file line number Diff line number Diff line change @@ -421,7 +421,7 @@ class Popup extends UI5Element {
421
421
element = element . shadowRoot . activeElement ;
422
422
}
423
423
424
- this . _lastFocusableElement = element ;
424
+ this . _lastFocusableElement = ( element && typeof element . focus === "function" ) ? element : null ;
425
425
}
426
426
427
427
resetFocus ( ) {
You can’t perform that action at this time.
0 commit comments