1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00

Merge pull request #979 from dmitrylyzo/fix_page_back

Fix view restoring
This commit is contained in:
dkanada 2020-03-24 17:22:20 +09:00 committed by GitHub
commit 2c67e7d1d9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -511,9 +511,16 @@ define(['loading', 'globalize', 'events', 'viewManager', 'layoutManager', 'skinM
return baseRoute;
}
var popstateOccurred = false;
window.addEventListener('popstate', function () {
popstateOccurred = true;
});
function getHandler(route) {
return function (ctx, next) {
ctx.isBack = popstateOccurred;
handleRoute(ctx, next, route);
popstateOccurred = false;
};
}