mirror of
https://github.com/zulip/zulip.git
synced 2025-10-23 04:52:12 +00:00
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:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user