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
1 changed files with 5 additions and 1 deletions

View File

@ -639,7 +639,11 @@ $(function () {
if (scroll_positions.hasOwnProperty(target_tab)) {
viewport.scrollTop(scroll_positions[target_tab]);
} else {
viewport.scrollTop(0);
if (target_tab === '#home') {
scroll_to_selected();
} else {
viewport.scrollTop(0);
}
}
});