mirror of
https://github.com/zulip/zulip.git
synced 2025-11-02 13:03:29 +00:00
lightbox: Use single keydown handler for toggling overlay.
We use the same "v" key for opening and closing the
lightbox overlay.
We already have code to open and close the lightbox
overlay in hotkey.ts.
Having another keydown handler for closing the overlay
resulted in a bug where the overlay was just not being
opened because the second handler was immediately called
to close the overlay was immediately called after the first.
Fixes #35868.
(cherry picked from commit 6ab670bdee)
This commit is contained in:
@@ -106,9 +106,6 @@ export class PanZoomControl {
|
||||
case "-":
|
||||
this.zoomOut();
|
||||
break;
|
||||
case "v":
|
||||
overlays.close_overlay("lightbox");
|
||||
break;
|
||||
}
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
|
||||
Reference in New Issue
Block a user