Fix recent scrolling changes for Firefox

This commit is contained in:
Scott Erickson 2016-02-17 11:21:43 -08:00
parent 53eea0c236
commit 0905a378a0
2 changed files with 5 additions and 2 deletions

View file

@ -185,7 +185,10 @@ module.exports = class CocoRouter extends Backbone.Router
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
_.delay (->
$('html')[0].scrollTop = 0
$('body')[0].scrollTop = 0
), 10
onGPlusAPILoaded: =>
@renderLoginButtons()

View file

@ -442,7 +442,7 @@ module.exports = class CocoView extends Backbone.View
scrollToLink: (link, speed=300) ->
scrollTo = $(link).offset().top
$('body').animate({ scrollTop: scrollTo }, speed)
$('html, body').animate({ scrollTop: scrollTo }, speed)
toggleFullscreen: (e) ->
# https://developer.mozilla.org/en-US/docs/Web/Guide/API/DOM/Using_full_screen_mode?redirectlocale=en-US&redirectslug=Web/Guide/DOM/Using_full_screen_mode