mirror of https://github.com/zulip/zulip.git
Fix scrolling glitches when zooming out to streams.
If you go into "more topics" for a stream with many topics, and then scroll down, and then zoom out again with "All streams", we make sure the active stream is still in view.
This commit is contained in:
parent
9dd78c803c
commit
9201137059
|
@ -182,6 +182,10 @@ function zoom_out(options) {
|
|||
popovers.hide_all();
|
||||
topic_list.zoom_out(options);
|
||||
|
||||
if (options.stream_li) {
|
||||
exports.scroll_to_active_stream(options.stream_li);
|
||||
}
|
||||
|
||||
// Show stream list titles and pinned stream splitter
|
||||
$(".stream-filters-label").each(function () {
|
||||
$(this).show();
|
||||
|
|
|
@ -210,7 +210,10 @@ exports.set_click_handlers = function (callbacks) {
|
|||
});
|
||||
|
||||
$('.show-all-streams').on('click', function (e) {
|
||||
callbacks.zoom_out({clear_topics: false});
|
||||
callbacks.zoom_out({
|
||||
clear_topics: false,
|
||||
stream_li: active_widget.get_parent(),
|
||||
});
|
||||
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
|
|
Loading…
Reference in New Issue