Only reselect the selected message on rerender if it's not -1

We could get into this situation when someone is doing a search and
someone else edits a message while the results are still loading.

(imported from commit 99e371fd75c7ae7dc98a0c03bc434e434da44b94)
This commit is contained in:
Zev Benjamin 2013-06-04 16:07:44 -04:00
parent 1d2c1a00bc
commit 835dd6673a

View File

@ -589,7 +589,9 @@ MessageList.prototype = {
// things.
this._clear_rendering_state();
this._rerender_preserving_scrolltop();
this.select_id(this._selected_id);
if (this._selected_id !== -1) {
this.select_id(this._selected_id);
}
},
all: function MessageList_all() {