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:
Steve Howell
2018-07-26 20:13:37 +00:00
committed by Tim Abbott
parent 4a53560106
commit 407b13af25
2 changed files with 4 additions and 3 deletions

View File

@@ -4,7 +4,7 @@ var list_cursor = function (opts) {
var config_ok =
opts.highlight_class &&
opts.list &&
opts.list.container &&
opts.list.scroll_container_sel &&
opts.list.find_li &&
opts.list.first_key &&
opts.list.prev_key &&
@@ -61,7 +61,8 @@ var list_cursor = function (opts) {
};
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 () {

View File

@@ -534,7 +534,7 @@ exports.initialize = function () {
exports.stream_cursor = list_cursor({
list: {
container: $('#stream-filters-container'),
scroll_container_sel: '#stream-filters-container',
find_li: function (opts) {
var stream_id = opts.key;
var li = exports.get_stream_li(stream_id);