mirror of
https://github.com/zulip/zulip.git
synced 2026-07-18 21:04:19 +08:00
Fix autoscrolling on new messages.
This was apparently broken by the final revision of our fix to the autoscrolling+narrow bugs, because it attempted to use jquery's animation queues to restrict which animations were stopped, and this doesn't seem to work. (imported from commit cf97f9f56dc5a16d1aa0322b5e6ec432a76d3be2)
This commit is contained in:
parent
71a91197fa
commit
71203a996a
@ -434,8 +434,7 @@ MessageList.prototype = {
|
||||
// viewport (which is window) doesn't have a scrollTop, so scroll
|
||||
// the closest concept that does.
|
||||
$("html, body").animate({scrollTop: viewport_offset +
|
||||
Math.min(new_messages_height, available_space_for_scroll)},
|
||||
{"queue": "autoscroll"});
|
||||
Math.min(new_messages_height, available_space_for_scroll)});
|
||||
}
|
||||
},
|
||||
|
||||
@ -525,7 +524,8 @@ MessageList.prototype = {
|
||||
};
|
||||
|
||||
$(document).on('message_selected.zephyr hashchange.zephyr mousewheel', function (event) {
|
||||
$("html, body").stop({"queue": "autoscroll"});
|
||||
// TODO: Figure out how to limit this animation stop to just the autoscroll
|
||||
$("html, body").stop();
|
||||
});
|
||||
}());
|
||||
/*jslint nomen: false */
|
||||
|
||||
Loading…
Reference in New Issue
Block a user