mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
fix showtab
This commit is contained in:
parent
e51031cad8
commit
f6b89286dc
1 changed files with 9 additions and 6 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue