mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2024-11-27 17:45:40 -05:00
Fix navigation from one page to the next
* Reset flying focus so it doesn't lengthen the page * Scroll to the top of the page when switching views
This commit is contained in:
parent
c8551a6382
commit
53eea0c236
1 changed files with 2 additions and 0 deletions
|
@ -184,6 +184,8 @@ module.exports = class CocoRouter extends Backbone.Router
|
|||
return unless window.currentView?
|
||||
window.currentView.destroy()
|
||||
$('.popover').popover 'hide'
|
||||
$('#flying-focus').css({top: 0, left: 0}) # otherwise it might make the page unnecessarily tall
|
||||
_.delay (-> $('body')[0].scrollTop = 0), 10
|
||||
|
||||
onGPlusAPILoaded: =>
|
||||
@renderLoginButtons()
|
||||
|
|
Loading…
Reference in a new issue