Permalink
Browse files

Fixed headers disappearing in Chrome

  • Loading branch information...
1 parent e9eba55 commit b642e1d57301ed9dc9dbbcafb19d7a3d1c6bad01 @meyogi committed Mar 28, 2012
Showing with 7 additions and 6 deletions.
  1. +7 −6 slick.grid.js
View
@@ -1510,14 +1510,15 @@ if (typeof Slick === "undefined") {
function handleScroll() {
scrollTop = $viewport[0].scrollTop;
- var scrollRear = $viewport[0][propScrollRear];
+ var scrollRear = $viewport[0][propScrollRear];
var scrollDist = Math.abs(scrollTop - prevScrollTop);
- if (scrollRear !== prevScrollRear) {
- prevScrollRear = scrollRear;
- $headerScroller[0][propScrollRear] = scrollRear;
- $topPanelScroller[0][propScrollRear] = scrollRear;
- $headerRowScroller[0][propScrollRear] = scrollRear;
+ if (scrollRear !== prevScrollRear) {
+ var diff = scrollRear - prevScrollRear;
+ prevScrollRear = scrollRear;
+ $headerScroller[0][propScrollRear] = $headerScroller[0][propScrollRear] + diff;
+ $topPanelScroller[0][propScrollRear] = $topPanelScroller[0][propScrollRear] + diff;
+ $headerRowScroller[0][propScrollRear] = $headerRowScroller[0][propScrollRear] + diff;
}
if (scrollDist) {

0 comments on commit b642e1d

Please sign in to comment.