If you unnarrow while scrolling, wait for the scroll to finish.

Otherwise you may end up scrolled to a random place.

(imported from commit 99d73b1876e3bde288b14b00bd48b1013f40e268)
This commit is contained in:
Jessica McKellar
2013-07-16 14:00:47 -04:00
parent 68f2991746
commit 4ac64ed6eb
2 changed files with 17 additions and 0 deletions

View File

@@ -2,6 +2,12 @@ var ui = (function () {
var exports = {};
var actively_scrolling = false;
exports.actively_scrolling = function () {
return actively_scrolling;
};
// What, if anything, obscures the home tab?
exports.home_tab_obscured = function () {
if ($('.modal:visible').length > 0)
@@ -659,6 +665,8 @@ $(function () {
var scroll_start_message;
function scroll_finished() {
actively_scrolling = false;
if ($('#home').hasClass('active')) {
if (!suppress_scroll_pointer_update) {
keep_pointer_in_view();
@@ -683,6 +691,7 @@ $(function () {
var scroll_timer;
function scroll_finish() {
actively_scrolling = true;
clearTimeout(scroll_timer);
scroll_timer = setTimeout(scroll_finished, 100);
}