mirror of https://github.com/zulip/zulip.git
stream settings: Remove obsolete scrolling code.
We just want to reset the scrollbar here, which we still do via ui.reset_scrollbar. You don't want to preserve scroll position if you are filtering or re-sorting.
This commit is contained in:
parent
0060644712
commit
62e272ce27
|
@ -28,18 +28,6 @@ set_global("hash_util", {
|
|||
});
|
||||
|
||||
run_test("filter_table", () => {
|
||||
const stream_list = $(".streams-list");
|
||||
|
||||
let scrolltop_called = false;
|
||||
stream_list.scrollTop = function (set) {
|
||||
scrolltop_called = true;
|
||||
if (!set) {
|
||||
return 10;
|
||||
}
|
||||
assert.equal(set, 10);
|
||||
return this;
|
||||
};
|
||||
|
||||
// set-up sub rows stubs
|
||||
const sub_row_data = [
|
||||
{
|
||||
|
@ -167,7 +155,6 @@ run_test("filter_table", () => {
|
|||
|
||||
// assert these once and call it done
|
||||
assert(ui_called);
|
||||
assert(scrolltop_called);
|
||||
assert(tooltip_called);
|
||||
assert.deepEqual(sub_table_append, [
|
||||
".stream-row-poland",
|
||||
|
|
|
@ -433,7 +433,6 @@ exports.filter_table = function (left_panel_params) {
|
|||
}
|
||||
|
||||
const widgets = new Map();
|
||||
const streams_list_scrolltop = ui.get_scroll_element($(".streams-list")).scrollTop();
|
||||
|
||||
const stream_ids = [];
|
||||
|
||||
|
@ -478,9 +477,6 @@ exports.filter_table = function (left_panel_params) {
|
|||
}
|
||||
|
||||
exports.maybe_reset_right_panel();
|
||||
|
||||
// this puts the scrollTop back to what it was before the list was updated again.
|
||||
ui.get_scroll_element($(".streams-list")).scrollTop(streams_list_scrolltop);
|
||||
};
|
||||
|
||||
let sort_order = "by-stream-name";
|
||||
|
|
Loading…
Reference in New Issue