mirror of
https://github.com/zulip/zulip.git
synced 2025-11-03 05:23:35 +00:00
ui.get_scroll_element: Set up SimpleBar if it’s expected but missing.
Although SimpleBar automatically sets itself up on elements with a `data-simplebar` attribute, sometimes we try to set event listeners before that happens. Create the SimpleBar early in that case. Signed-off-by: Anders Kaseorg <anders@zulipchat.com>
This commit is contained in:
@@ -16,6 +16,7 @@ function init_simulated_scrolling() {
|
||||
});
|
||||
|
||||
var elem = {
|
||||
dataset: {},
|
||||
scrollTop: 0,
|
||||
scrollHeight: 0,
|
||||
};
|
||||
|
||||
@@ -340,6 +340,9 @@ run_test('zoom_in_and_zoom_out', () => {
|
||||
f.call(elem(stream_li1));
|
||||
f.call(elem(stream_li2));
|
||||
};
|
||||
$('#stream-filters-container')[0] = {
|
||||
dataset: {},
|
||||
};
|
||||
stream_list.set_event_handlers();
|
||||
|
||||
stream_list.zoom_in_topics({stream_id: 42});
|
||||
|
||||
Reference in New Issue
Block a user