Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

hotkey: Check for open popovers before overlays for escape key.

sahil839fed6b283e647
diff --git a/static/js/hotkey.js b/static/js/hotkey.js
index f3675acbbcc..573b865ac41 100644
--- a/static/js/hotkey.js
+++ b/static/js/hotkey.js
@@ -192,6 +192,11 @@ exports.process_escape_key = function (e) {
return true;
}
+ if (popovers.any_active()) {
+ popovers.hide_all();
+ return true;
+ }
+
if (overlays.is_modal_open()) {
overlays.close_active_modal();
return true;
@@ -253,11 +258,6 @@ exports.process_escape_key = function (e) {
return true;
}
- if (popovers.any_active()) {
- popovers.hide_all();
- return true;
- }
-
if (compose_state.composing()) {
compose_actions.cancel();
return true;