aboutsummaryrefslogtreecommitdiffstats
path: root/core/src
diff options
context:
space:
mode:
authorRoeland Jago Douma <roeland@famdouma.nl>2019-10-21 21:36:17 +0200
committerRoeland Jago Douma <roeland@famdouma.nl>2019-10-21 21:36:17 +0200
commit87c2ab3ffa9b9c237e247f14e96f6990b311c40e (patch)
tree3aaa190a14533dd55728dbf523d5c788e4b4ec7c /core/src
parent923735021b35d08aadf00cb30e3e9eda42f50a50 (diff)
downloadnextcloud-server-87c2ab3ffa9b9c237e247f14e96f6990b311c40e.tar.gz
nextcloud-server-87c2ab3ffa9b9c237e247f14e96f6990b311c40e.zip
Fix browser back button
Fixes #17108 Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Diffstat (limited to 'core/src')
-rw-r--r--core/src/main.js7
1 files changed, 7 insertions, 0 deletions
diff --git a/core/src/main.js b/core/src/main.js
index b8c1c23628f..29c657f5db3 100644
--- a/core/src/main.js
+++ b/core/src/main.js
@@ -35,4 +35,11 @@ import { registerAppsSlideToggle } from './OC/apps'
$(document).ready(function() {
initCore()
registerAppsSlideToggle()
+
+ // fallback to hashchange when no history support
+ if (window.history.pushState) {
+ window.onpopstate = _.bind(OC.Util.History._onPopState, OC.Util.History)
+ } else {
+ $(window).on('hashchange', _.bind(OC.Util.History._onPopState, OC.Util.History))
+ }
})