File tree 1 file changed +6
-3
lines changed
angular/src/directives/navigation
1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -87,8 +87,9 @@ export class IonTabs {
87
87
* to the default tabRootUrl
88
88
*/
89
89
@HostListener ( 'ionTabButtonClick' , [ '$event' ] )
90
- select ( ev : CustomEvent ) {
91
- const tab = ev . detail . tab ;
90
+ select ( tabOrEvent : string | CustomEvent ) {
91
+ const isTabString = typeof tabOrEvent === 'string' ;
92
+ const tab = ( isTabString ) ? tabOrEvent : ( tabOrEvent as CustomEvent ) . detail . tab ;
92
93
const alreadySelected = this . outlet . getActiveStackId ( ) === tab ;
93
94
const tabRootUrl = `${ this . outlet . tabsPrefix } /${ tab } ` ;
94
95
@@ -98,7 +99,9 @@ export class IonTabs {
98
99
* will respond to this event too, causing
99
100
* the app to get directed to the wrong place.
100
101
*/
101
- ev . stopPropagation ( ) ;
102
+ if ( ! isTabString ) {
103
+ ( tabOrEvent as CustomEvent ) . stopPropagation ( ) ;
104
+ }
102
105
103
106
if ( alreadySelected ) {
104
107
const activeStackId = this . outlet . getActiveStackId ( ) ;
You can’t perform that action at this time.
0 commit comments