Explorar o código

Fix single-doc reload on escape in Firefox

Thibaut %!s(int64=11) %!d(string=hai) anos
pai
achega
02029e5e23
Modificáronse 1 ficheiros con 4 adicións e 2 borrados
  1. 4 2
      assets/javascripts/app/router.coffee

+ 4 - 2
assets/javascripts/app/router.coffee

@@ -69,8 +69,10 @@ class app.Router
     return
 
   root: ->
-    window.location = '/' if app.isSingleDoc()
-    @triggerRoute 'root'
+    if app.isSingleDoc()
+      setTimeout (-> window.location = '/'), 0
+    else
+      @triggerRoute 'root'
     return
 
   about: (context) ->