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:
Scott Erickson 2016-02-17 09:59:08 -08:00
parent c8551a6382
commit 53eea0c236

View file

@ -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()