mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
Fix back on load [Tizen 2.x]
This commit is contained in:
parent
e27131edf0
commit
cb6ab0f41c
1 changed files with 10 additions and 2 deletions
|
@ -30,8 +30,16 @@ class AppRouter {
|
|||
startPages = ['home', 'login', 'selectserver'];
|
||||
|
||||
constructor() {
|
||||
window.addEventListener('popstate', () => {
|
||||
this.popstateOccurred = true;
|
||||
// WebKit fires a popstate event on document load
|
||||
// Skip it using timeout
|
||||
// For Tizen 2.x
|
||||
// https://stackoverflow.com/a/12214354
|
||||
window.addEventListener('load', () => {
|
||||
setTimeout(() => {
|
||||
window.addEventListener('popstate', () => {
|
||||
this.popstateOccurred = true;
|
||||
});
|
||||
}, 0);
|
||||
});
|
||||
|
||||
document.addEventListener('viewshow', () => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue