Browse Source

#2605 last scroll value should only be saved if element scroll position changes

pull/2616/merge
jlukic 9 years ago
parent
commit
b61fef3205
1 changed files with 4 additions and 4 deletions
  1. 8
      src/definitions/modules/sticky.js

8
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() {

Loading…
Cancel
Save