subscriptions: Fix scrolling of streams list.

The previous element passed was a simplebar container which calculated
the incorrect height, thus `scroll_util.scroll_element_into_container`
had no effect.
This commit is contained in:
Ryan Rehman 2020-07-06 20:00:48 +05:30 committed by Tim Abbott
parent 23f807bf13
commit ca99d62b4e
1 changed files with 2 additions and 1 deletions

View File

@ -630,11 +630,12 @@ exports.setup_page = function (callback) {
exports.switch_to_stream_row = function (stream_id) {
const stream_row = exports.row_for_stream_id(stream_id);
const container = $(".streams-list");
exports.get_active_data().row.removeClass("active");
stream_row.addClass("active");
scroll_util.scroll_element_into_container(stream_row, stream_row.parent());
scroll_util.scroll_element_into_container(stream_row, container);
// It's dubious that we need this timeout any more.
setTimeout(() => {