mirror of https://github.com/zulip/zulip.git
overlays: Use `close_overlay` to close overlays!
It is unusal to use a hack to close overlays when there is a method to do it. This fixes a bug where user is unable to scroll message feed after opening an overlay and then using browser back button. This could have easily cause other bugs too.
This commit is contained in:
parent
db26f2b2fc
commit
ea9992d853
|
@ -385,9 +385,8 @@ export function close_active_modal(): void {
|
|||
}
|
||||
|
||||
export function close_for_hash_change(): void {
|
||||
$("div.overlay.show").removeClass("show");
|
||||
if (active_overlay) {
|
||||
active_overlay.close_handler();
|
||||
if (open_overlay_name) {
|
||||
close_overlay(open_overlay_name);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue