File tree Expand file tree Collapse file tree 1 file changed +11
-3
lines changed
assets/Zed/js/modules/libs Expand file tree Collapse file tree 1 file changed +11
-3
lines changed Original file line number Diff line number Diff line change 11'use strict' ;
22
3- // TODO: add support for multi-tab navigation hash handling (e.g "/#tab1=tab-content-foo&tab2=tab-content-bar")
43var bootstrap = require ( 'bootstrap' ) ;
54
65function Tabs ( selector , onTabChange ) {
@@ -11,6 +10,7 @@ function Tabs(selector, onTabChange) {
1110 this . onTabChange = onTabChange || function ( ) { } ;
1211
1312 this . checkErrors ( ) ;
13+ this . checkActivatedTab ( ) ;
1414 this . setNavigation ( ) ;
1515 this . mapChangeEvent ( ) ;
1616}
@@ -100,12 +100,20 @@ Tabs.prototype.checkActivatedTab = function () {
100100 var positionChanged = false ;
101101 self . tabUrls . each ( function ( ) {
102102 var element = $ ( this ) ;
103- if ( positionChanged === false && element . attr ( 'href' ) === self . currentUrlHash ) {
103+
104+ var tabTarget = element . closest ( [ 'data-bs-target' ] ) . data ( 'bs-target' ) || element . attr ( 'href' ) ;
105+ if (
106+ positionChanged === false &&
107+ ( element . attr ( 'href' ) === self . currentUrlHash || tabTarget === self . currentUrlHash )
108+ ) {
104109 self . currentTabPosition = position ;
105110
106111 positionChanged = true ;
107112 self . activateTab ( element , self . currentUrlHash ) ;
108- self . showHideNavigationButtons ( ) ;
113+
114+ if ( self . tabsContainer . data ( 'isNavigable' ) === true ) {
115+ self . showHideNavigationButtons ( ) ;
116+ }
109117 }
110118 position ++ ;
111119 } ) ;
You can’t perform that action at this time.
0 commit comments