Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

list_widget: Set $scroll_container directly in `meta` object.

Lalit08f84f0a4560
diff --git a/web/src/list_widget.js b/web/src/list_widget.js
index 58d24f12b1f..bc946597f80 100644
--- a/web/src/list_widget.js
+++ b/web/src/list_widget.js
@@ -166,6 +166,7 @@ export function create($container, list, opts) {
filtered_list: list,
reverse_mode: false,
filter_value: "",
+ $scroll_container: scroll_util.get_scroll_element(opts.$simplebar_container),
};
if (!valid_filter_opts(opts)) {
@@ -310,8 +311,6 @@ export function create($container, list, opts) {
},
set_up_event_handlers() {
- meta.$scroll_container = scroll_util.get_scroll_element(opts.$simplebar_container);
-
// on scroll of the nearest scrolling container, if it hits the bottom
// of the container then fetch a new block of items and render them.
meta.$scroll_container.on("scroll.list_widget_container", function () {