Fix a scrolling bug with chrome
This commit is contained in:
parent
38ac95c863
commit
e96ae165b2
|
@ -604,7 +604,9 @@ weechat.controller('WeechatCtrl', ['$rootScope', '$scope', '$store', '$timeout',
|
||||||
var scroll = function() {
|
var scroll = function() {
|
||||||
var sTop = bl.scrollTop;
|
var sTop = bl.scrollTop;
|
||||||
// Determine if we want to scroll at all
|
// Determine if we want to scroll at all
|
||||||
if (nonIncremental && sTop < sVal || sTop == sVal) {
|
// Give the check 3 pixels of slack so you don't have to hit
|
||||||
|
// the exact spot. This fixes a bug in some browsers
|
||||||
|
if (nonIncremental && sTop < sVal || (sTop - sVal < 3)) {
|
||||||
var readmarker = document.getElementById('readmarker');
|
var readmarker = document.getElementById('readmarker');
|
||||||
if(nonIncremental && readmarker) {
|
if(nonIncremental && readmarker) {
|
||||||
// Switching channels, scroll to read marker
|
// Switching channels, scroll to read marker
|
||||||
|
|
Loading…
Reference in New Issue