diff --git a/src/definitions/modules/sticky.js b/src/definitions/modules/sticky.js index 55fc76c98..446fa94ad 100644 --- a/src/definitions/modules/sticky.js +++ b/src/definitions/modules/sticky.js @@ -475,6 +475,8 @@ $.fn.sticky = function(parameters) { // scroll element if larger than screen else if(doesntFit) { module.set.scroll(elementScroll); + module.save.lastScroll(scroll.top); + module.save.elementScroll(elementScroll); } } @@ -494,6 +496,8 @@ $.fn.sticky = function(parameters) { // scroll element if larger than screen else if(doesntFit) { module.set.scroll(elementScroll); + module.save.lastScroll(scroll.top); + module.save.elementScroll(elementScroll); } } @@ -513,10 +517,6 @@ $.fn.sticky = function(parameters) { } } } - - // save current scroll for next run - module.save.lastScroll(scroll.top); - module.save.elementScroll(elementScroll); }, bindTop: function() {