mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2025-03-25 12:20:32 -04:00
Fix recent scrolling changes for Firefox
This commit is contained in:
parent
53eea0c236
commit
0905a378a0
2 changed files with 5 additions and 2 deletions
app
|
@ -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()
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue