File tree 1 file changed +2
-2
lines changed
packages/main/src/popup-utils
1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ let currentZIndex = 100;
3
3
const getFocusedElement = ( ) => {
4
4
let element = document . activeElement ;
5
5
6
- while ( element . shadowRoot && element . shadowRoot . activeElement ) {
6
+ while ( element && element . shadowRoot && element . shadowRoot . activeElement ) {
7
7
element = element . shadowRoot . activeElement ;
8
8
}
9
9
@@ -62,7 +62,7 @@ const isClickInRect = (event, rect) => {
62
62
const getClosedPopupParent = el => {
63
63
const parent = el . parentElement || ( el . getRootNode && el . getRootNode ( ) . host ) ;
64
64
65
- if ( ( parent . openBy && parent . isUI5Element ) || ( parent . open && parent . isUI5Element ) || parent === document . documentElement ) {
65
+ if ( parent && ( ( parent . openBy && parent . isUI5Element ) || ( parent . open && parent . isUI5Element ) || parent === document . documentElement ) ) {
66
66
return parent ;
67
67
}
68
68
You can’t perform that action at this time.
0 commit comments