File tree Expand file tree Collapse file tree 3 files changed +15
-1
lines changed
Expand file tree Collapse file tree 3 files changed +15
-1
lines changed Original file line number Diff line number Diff line change 1+ ---
2+ " @patternfly/elements " : patch
3+ ---
4+
5+ ` BaseTab ` :
6+ - fixed Safari focus issue on keyboard navigation
7+ - fixed Safari focus issue on mouse click
Original file line number Diff line number Diff line change @@ -63,9 +63,14 @@ export abstract class BaseTab extends LitElement {
6363 }
6464 }
6565
66+ focus ( ) {
67+ this . button . focus ( ) ;
68+ }
69+
6670 #clickHandler( ) {
6771 if ( ! this . disabled && this . #internals. ariaDisabled !== 'true' && this . ariaDisabled !== 'true' ) {
6872 this . active = true ;
73+ this . focus ( ) ; // safari fix
6974 }
7075 }
7176
Original file line number Diff line number Diff line change @@ -226,8 +226,10 @@ export abstract class BaseTabs extends LitElement {
226226 }
227227
228228 if ( event . active ) {
229+ if ( event . tab !== this . #tabindex. activeItem ) {
230+ this . #tabindex. updateActiveItem ( event . tab ) ;
231+ }
229232 this . activeIndex = this . #allTabs. findIndex ( tab => tab === event . tab ) ;
230- this . #tabindex. updateActiveItem ( this . #activeTab) ;
231233 }
232234 } ;
233235
You can’t perform that action at this time.
0 commit comments