mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
Merge pull request #2668 from jellyfin/fix-tizen-back-on-load
Fix back on load [Tizen 2.x]
This commit is contained in:
commit
ce56a221b5
1 changed files with 10 additions and 2 deletions
|
@ -31,8 +31,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