From 4bb330bb21deef5b41a6a540906126d0caeb0416 Mon Sep 17 00:00:00 2001 From: Waseem Daher Date: Fri, 7 Dec 2012 14:58:37 -0500 Subject: [PATCH] Allow 'Esc' to clear a keyboard-driven Find. (imported from commit d48028531b6e7286d177790ec5adb2e5f256b1e0) --- zephyr/static/js/hotkey.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/zephyr/static/js/hotkey.js b/zephyr/static/js/hotkey.js index 4b50593251..7396ae40d2 100644 --- a/zephyr/static/js/hotkey.js +++ b/zephyr/static/js/hotkey.js @@ -93,11 +93,13 @@ function process_hotkey(e) { select_message(rows.last_visible(), {then_scroll: false}); } return false; - case 27: // Esc: close userinfo popup, cancel compose, or un-narrow + case 27: // Esc: close userinfo popup, cancel compose, clear a find, or un-narrow if (ui.userinfo_currently_popped()) { ui.hide_userinfo_popover(); } else if (compose.composing()) { compose.cancel(); + } else if (search.keyboard_currently_finding()) { + search.clear_search(); } else { narrow.show_all_messages(); }