Do not try to recenter if you were already moving in the right direction.

Before this commit, if you try to arrow around when the selected
message is outside the pointer threshold for recentering, you get a
big jump, even if you are arrowing towards the center of the viewport.

(imported from commit 5c15d5ccccdf027a8bfa8b79bf519fccbfa971d8)
This commit is contained in:
Jessica McKellar
2013-03-28 14:16:48 -04:00
parent 0f02eb17f4
commit 3df47f2025
4 changed files with 32 additions and 3 deletions

View File

@@ -617,6 +617,7 @@ $(function () {
// scroll handler, but when we're at the top or bottom of the
// page, the pointer may still need to move.
move_pointer_at_page_top_and_bottom(delta);
last_viewport_movement_direction = delta;
});
$(window).mousewheel(function (e, delta) {