From c2f02ebbfb891b8bc6bab6816afe5b1612be948e Mon Sep 17 00:00:00 2001 From: Scott Erickson Date: Tue, 16 Feb 2016 10:47:49 -0800 Subject: [PATCH] Fix scrollToLink, including removing unneeded offset --- app/views/core/CocoView.coffee | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/views/core/CocoView.coffee b/app/views/core/CocoView.coffee index 1c133e7a8..316c699ea 100644 --- a/app/views/core/CocoView.coffee +++ b/app/views/core/CocoView.coffee @@ -441,8 +441,8 @@ module.exports = class CocoView extends Backbone.View slider scrollToLink: (link, speed=300) -> - scrollTo = $(link).offset().top + $('#page-container')[0].scrollTop - $('#page-container').animate({ scrollTop: scrollTo }, speed) + scrollTo = $(link).offset().top + $('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