mirror of
https://github.com/zulip/zulip.git
synced 2025-11-05 22:43:42 +00:00
list_cursor: Replace container with scroll_container_sel.
Our lists tend to have both containers and scroll_containers, and we care more about the latter to the extent they're different.
This commit is contained in:
@@ -4,7 +4,7 @@ var list_cursor = function (opts) {
|
|||||||
var config_ok =
|
var config_ok =
|
||||||
opts.highlight_class &&
|
opts.highlight_class &&
|
||||||
opts.list &&
|
opts.list &&
|
||||||
opts.list.container &&
|
opts.list.scroll_container_sel &&
|
||||||
opts.list.find_li &&
|
opts.list.find_li &&
|
||||||
opts.list.first_key &&
|
opts.list.first_key &&
|
||||||
opts.list.prev_key &&
|
opts.list.prev_key &&
|
||||||
@@ -61,7 +61,8 @@ var list_cursor = function (opts) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
self.adjust_scroll = function (li) {
|
self.adjust_scroll = function (li) {
|
||||||
scroll_util.scroll_element_into_container(li, opts.list.container);
|
var scroll_container = $(opts.list.scroll_container_sel);
|
||||||
|
scroll_util.scroll_element_into_container(li, scroll_container);
|
||||||
};
|
};
|
||||||
|
|
||||||
self.redraw = function () {
|
self.redraw = function () {
|
||||||
|
|||||||
@@ -534,7 +534,7 @@ exports.initialize = function () {
|
|||||||
|
|
||||||
exports.stream_cursor = list_cursor({
|
exports.stream_cursor = list_cursor({
|
||||||
list: {
|
list: {
|
||||||
container: $('#stream-filters-container'),
|
scroll_container_sel: '#stream-filters-container',
|
||||||
find_li: function (opts) {
|
find_li: function (opts) {
|
||||||
var stream_id = opts.key;
|
var stream_id = opts.key;
|
||||||
var li = exports.get_stream_li(stream_id);
|
var li = exports.get_stream_li(stream_id);
|
||||||
|
|||||||
Reference in New Issue
Block a user