mirror of
https://github.com/zulip/zulip.git
synced 2026-07-12 21:04:41 +08:00
Don't save the pointer on reload if we don't have one.
This fixes the bug where the pointer jumps to the top if it reloads before finishing loading. (imported from commit 6b2d80acab4d4232f6eb87695193592a83c4466a)
This commit is contained in:
parent
fbe55f733c
commit
8b3cd91d39
@ -33,7 +33,10 @@ function preserve_state(send_after_reload) {
|
||||
url += "+msg=" + encodeURIComponent(compose.message_content());
|
||||
}
|
||||
|
||||
url += "+pointer=" + current_msg_list.selected_id();
|
||||
var pointer = current_msg_list.selected_id();
|
||||
if (pointer !== -1) {
|
||||
url += "+pointer=" + pointer;
|
||||
}
|
||||
|
||||
var oldhash = window.location.hash;
|
||||
if (oldhash.length !== 0 && oldhash[0] === '#') {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user