Don't jump to top of page when returning from another tab.

This fixes Trac #723 - Message view scrolls to top after reloading on another tab (e.g. settings)

(imported from commit d9134cec6879625d577c43a08d258af3f6dacc5f)
This commit is contained in:
Waseem Daher
2013-01-25 16:13:02 -07:00
parent f2659b7dcd
commit 86b87556a6

View File

@@ -638,9 +638,13 @@ $(function () {
// because otherwise that action may scroll us somewhere.)
if (scroll_positions.hasOwnProperty(target_tab)) {
viewport.scrollTop(scroll_positions[target_tab]);
} else {
if (target_tab === '#home') {
scroll_to_selected();
} else {
viewport.scrollTop(0);
}
}
});
// N.B. that subs.setup_page calls focus() on our stream textbox,