Skip to content

Commit

Permalink
Fixed headers disappearing in Chrome
Browse files Browse the repository at this point in the history
  • Loading branch information
meyogi committed Mar 28, 2012
1 parent e9eba55 commit b642e1d
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions slick.grid.js
Expand Up @@ -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) {
Expand Down

0 comments on commit b642e1d

Please sign in to comment.