Fix handling some target values for linkable tabs.

Replaces #5257
This commit is contained in:
Luke Towers 2020-09-01 13:27:03 -06:00
parent 32c63e0e3c
commit bf241baee7
2 changed files with 2 additions and 2 deletions

View File

@ -89,7 +89,7 @@
this.updateClasses()
if (location.hash && this.$tabsContainer.is('[data-linkable]')) {
$('li > a[href=' + location.hash + ']', this.$tabsContainer).tab('show')
$('li > a[href="' + location.hash + '"]', this.$tabsContainer).tab('show')
}
}

View File

@ -4597,7 +4597,7 @@ if(tabUrl){window.history.replaceState({},'Tab link reference',tabUrl)}})
if(this.options.slidable){this.$pagesContainer.touchwipe({wipeRight:function(){self.prev();},wipeLeft:function(){self.next();},preventDefaultEvents:false,min_move_x:60});}
this.$tabsContainer.toolbar({scrollClassContainer:this.$el})
this.updateClasses()
if(location.hash&&this.$tabsContainer.is('[data-linkable]')){$('li > a[href='+location.hash+']',this.$tabsContainer).tab('show')}}
if(location.hash&&this.$tabsContainer.is('[data-linkable]')){$('li > a[href="'+location.hash+'"]',this.$tabsContainer).tab('show')}}
Tab.prototype.initTab=function(li){var
$tabs=$('>li',this.$tabsContainer),tabIndex=$tabs.index(li),time=new Date().getTime(),targetId=this.tabId+'-tab-'+tabIndex+time,$anchor=$('a',li)
$anchor.data('target','#'+targetId).attr('data-target','#'+targetId).attr('data-toggle','tab')