@@ -5,7 +5,7 @@ import type { Attributes } from '@utils/helpers';
55import { inheritAttributes } from '@utils/helpers' ;
66
77import { config } from '../../global/config' ;
8- import { getIonTheme } from '../../global/ionic-global' ;
8+ import { getIonMode , getIonTheme } from '../../global/ionic-global' ;
99import type {
1010 TabBarChangedEventDetail ,
1111 TabButtonClickEventDetail ,
@@ -163,10 +163,20 @@ export class TabButton implements ComponentInterface, AnchorInterface {
163163 this . selectTab ( ev ) ;
164164 } ;
165165
166+ private canActivate ( ) : boolean {
167+ const theme = getIonTheme ( this ) ;
168+ const mode = getIonMode ( this ) ;
169+ if ( theme !== 'ionic' ) {
170+ return true ;
171+ }
172+ return mode === 'md' ;
173+ }
174+
166175 render ( ) {
167176 const { disabled, hasIcon, hasLabel, href, rel, target, layout, selected, tab, inheritedAttributes } = this ;
168177 const theme = getIonTheme ( this ) ;
169178 const shape = this . getShape ( ) ;
179+ const canActivate = this . canActivate ( ) ;
170180 const attrs = {
171181 download : this . download ,
172182 href,
@@ -188,7 +198,7 @@ export class TabButton implements ComponentInterface, AnchorInterface {
188198 'tab-has-label-only' : hasLabel && ! hasIcon ,
189199 'tab-has-icon-only' : hasIcon && ! hasLabel ,
190200 [ `tab-layout-${ layout } ` ] : true ,
191- 'ion-activatable' : true ,
201+ 'ion-activatable' : canActivate ,
192202 'ion-selectable' : true ,
193203 [ `tab-button-shape-${ shape } ` ] : shape !== undefined ,
194204 'ion-focusable' : true ,
0 commit comments