mirror of
https://github.com/jellyfin/jellyfin-web.git
synced 2024-11-17 19:08:18 -07:00
fix showtab
This commit is contained in:
parent
e51031cad8
commit
f6b89286dc
@ -164,13 +164,18 @@
|
||||
}
|
||||
|
||||
ownerpage.addEventListener('viewbeforeshow', function () {
|
||||
if (tabs.triggerBeforeTabChange) {
|
||||
if (tabs.triggerBeforeTabChange && this.firstTabIndex == null) {
|
||||
tabs.triggerBeforeTabChange();
|
||||
}
|
||||
});
|
||||
|
||||
ownerpage.addEventListener('viewshow', function () {
|
||||
tabs.triggerTabChange();
|
||||
if (this.firstTabIndex) {
|
||||
tabs.selectedIndex(this.firstTabIndex);
|
||||
this.firstTabIndex = null;
|
||||
} else {
|
||||
tabs.triggerTabChange();
|
||||
}
|
||||
});
|
||||
|
||||
tabs.addEventListener('beforetabchange', function (e) {
|
||||
@ -195,10 +200,8 @@
|
||||
|
||||
var afterNavigate = function () {
|
||||
|
||||
document.removeEventListener('pagebeforeshow', afterNavigate);
|
||||
|
||||
document.removeEventListener('pageinit', afterNavigate);
|
||||
if (window.location.href.toLowerCase().indexOf(url.toLowerCase()) != -1) {
|
||||
|
||||
this.firstTabIndex = index;
|
||||
}
|
||||
};
|
||||
@ -208,7 +211,7 @@
|
||||
afterNavigate.call(viewManager.currentView());
|
||||
} else {
|
||||
|
||||
pageClassOn('pagebeforeshow', 'page', afterNavigate);
|
||||
pageClassOn('pageinit', 'page', afterNavigate);
|
||||
Dashboard.navigate(url);
|
||||
}
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user