mirror of
https://github.com/zulip/zulip.git
synced 2025-10-29 02:53:52 +00:00
gear_menu: Eliminate scrollTop for non-home tabs.
We should be able to eventually further clean this up to do nothing, since we now don't have tabs over than the home tab. But I'm leaving that for a future issue.
This commit is contained in:
@@ -32,13 +32,11 @@ exports.initialize = function () {
|
||||
// After we show the new tab, restore its old scroll position
|
||||
// (we apparently have to do this after setting the hash,
|
||||
// because otherwise that action may scroll us somewhere.)
|
||||
if (scroll_positions.hasOwnProperty(target_tab)) {
|
||||
message_viewport.scrollTop(scroll_positions[target_tab]);
|
||||
} else {
|
||||
if (target_tab === '#home') {
|
||||
navigate.scroll_to_selected();
|
||||
if (target_tab === '#home') {
|
||||
if (scroll_positions.hasOwnProperty(target_tab)) {
|
||||
message_viewport.scrollTop(scroll_positions[target_tab]);
|
||||
} else {
|
||||
message_viewport.scrollTop(0);
|
||||
navigate.scroll_to_selected();
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user