Move save_narrow earlier in narrow.deactivate.

I think that this will fix the issues we've been having with
hashchange.save_narrow() screwing up the scroll position in the page.

(imported from commit 25af9b7dda2d107220e11dd12b9dc344bc63addc)
This commit is contained in:
Tim Abbott
2014-01-15 11:48:40 -05:00
parent 4d5d0d636f
commit 86f9ea0cd2

View File

@@ -399,6 +399,7 @@ exports.deactivate = function () {
$('#search_query').val('');
reset_load_more_status();
hashchange.save_narrow();
if (current_msg_list.selected_id() !== -1) {
var preserve_pre_narrowing_screen_position =
@@ -443,7 +444,6 @@ exports.deactivate = function () {
}
}
hashchange.save_narrow();
compose_fade.update_message_list();
$(document).trigger($.Event('narrow_deactivated.zulip', {msg_list: current_msg_list}));