mirror of https://github.com/zulip/zulip.git
Don't have scrollhandler fire when the 'home' tab isn't active.
(imported from commit 242591730e5ce108c511e4eeaad7589d768b1b94)
This commit is contained in:
parent
6d37154a36
commit
32758e2e4b
|
@ -120,10 +120,12 @@ $(function () {
|
|||
|
||||
var last_mousewheel_or_scroll = 0;
|
||||
function do_mousewheel_or_scroll () {
|
||||
var time = $.now();
|
||||
if (time - last_mousewheel_or_scroll > 50) {
|
||||
keep_pointer_in_view();
|
||||
last_mousewheel_or_scroll = time;
|
||||
if ($('#home').hasClass('active')) {
|
||||
var time = $.now();
|
||||
if (time - last_mousewheel_or_scroll > 50) {
|
||||
keep_pointer_in_view();
|
||||
last_mousewheel_or_scroll = time;
|
||||
}
|
||||
}
|
||||
}
|
||||
$(window).mousewheel(do_mousewheel_or_scroll);
|
||||
|
|
Loading…
Reference in New Issue