File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -685,17 +685,6 @@ class Popover extends Popup {
685685 } ;
686686 }
687687
688- get classes ( ) {
689- return {
690- root : {
691- "ui5-popup-root" : true ,
692- } ,
693- content : {
694- "ui5-popup-content" : true ,
695- } ,
696- } ;
697- }
698-
699688 /**
700689 * Hook for descendants to hide header.
701690 */
Original file line number Diff line number Diff line change @@ -266,6 +266,8 @@ class Popup extends UI5Element {
266266
267267 if ( firstFocusable ) {
268268 firstFocusable . focus ( ) ;
269+ } else {
270+ this . _root . focus ( ) ;
269271 }
270272 }
271273
@@ -278,6 +280,8 @@ class Popup extends UI5Element {
278280
279281 if ( lastFocusable ) {
280282 lastFocusable . focus ( ) ;
283+ } else {
284+ this . _root . focus ( ) ;
281285 }
282286 }
283287
@@ -299,7 +303,8 @@ class Popup extends UI5Element {
299303
300304 const element = this . getRootNode ( ) . getElementById ( this . initialFocus )
301305 || document . getElementById ( this . initialFocus )
302- || await getFirstFocusableElement ( this ) ;
306+ || await getFirstFocusableElement ( this )
307+ || this . _root ; // in case of no focusable content focus the root
303308
304309 if ( element ) {
305310 element . focus ( ) ;
@@ -486,6 +491,10 @@ class Popup extends UI5Element {
486491 return this . ariaLabel || undefined ;
487492 }
488493
494+ get _root ( ) {
495+ return this . shadowRoot . querySelector ( ".ui5-popup-root" ) ;
496+ }
497+
489498 get dir ( ) {
490499 return getRTL ( ) ? "rtl" : "ltr" ;
491500 }
@@ -502,8 +511,12 @@ class Popup extends UI5Element {
502511
503512 get classes ( ) {
504513 return {
505- root : { } ,
506- content : { } ,
514+ root : {
515+ "ui5-popup-root" : true ,
516+ } ,
517+ content : {
518+ "ui5-popup-content" : true ,
519+ } ,
507520 } ;
508521 }
509522}
Original file line number Diff line number Diff line change 2020 overflow : hidden;
2121 max-height : 94vh ;
2222 max-width : 90vw ;
23+ outline : none;
2324}
2425
2526@media screen and (-ms-high-contrast : active) {
Original file line number Diff line number Diff line change 505505 </ script >
506506</ body >
507507
508- </ html >
508+ </ html >
You can’t perform that action at this time.
0 commit comments