mirror of
https://github.com/zulip/zulip.git
synced 2025-11-05 06:23:38 +00:00
browser_history: If changing_hash, don't set to hash_before_overlay.
If we are changing_hash, it means `window.location.hash` is the new_hash, so we don't want to change hash further now. This used to create a loop of changing hashes as we used to close and open overlays if `hash_before_overlay` was an overlay. Fixes #18011
This commit is contained in:
@@ -55,7 +55,7 @@ export function update(new_hash) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export function exit_overlay() {
|
export function exit_overlay() {
|
||||||
if (hash_util.is_overlay_hash(window.location.hash)) {
|
if (hash_util.is_overlay_hash(window.location.hash) && !state.changing_hash) {
|
||||||
ui_util.blur_active_element();
|
ui_util.blur_active_element();
|
||||||
const new_hash = state.hash_before_overlay || "#";
|
const new_hash = state.hash_before_overlay || "#";
|
||||||
update(new_hash);
|
update(new_hash);
|
||||||
|
|||||||
Reference in New Issue
Block a user