Skip to content

Commit

Permalink
Don't need 1-pixel scroll offset for Firefox any more
Browse files Browse the repository at this point in the history
  • Loading branch information
billstclair committed May 6, 2012
1 parent 421e308 commit 12c0473
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions js/jsScroller.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ jsScroller = {};
if (!doScroll) {
var scrollTop = div.scrollTop();
div.html(str + '</table>');
var scrollDiff = scrollHeight - div[0].scrollHeight - scrollOffset;
var scrollDiff = scrollHeight - div[0].scrollHeight;
}
var columns = lines[idx++];
if (idx >= maxlines) idx = 0;
Expand All @@ -85,11 +85,4 @@ jsScroller = {};
}
}

function isFirefox() {
return (navigator.userAgent.match(/Firefox/));
}

// Don't know why Firefox is off by one pixel, but it is
var scrollOffset = isFirefox() ? 1 : 0;

})();

0 comments on commit 12c0473

Please sign in to comment.