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.

ui_util: Use e.key instead of deprecated e.which.

Priyank Patel283412a5b81a
diff --git a/static/js/ui_util.js b/static/js/ui_util.js
index 3f9a789820b..b88c01f1f73 100644
--- a/static/js/ui_util.js
+++ b/static/js/ui_util.js
@@ -32,9 +32,7 @@ export function blur_active_element() {
}
export function convert_enter_to_click(e) {
- const key = e.which;
- if (key === 13) {
- // Enter
+ if (e.key === "Enter") {
e.preventDefault();
e.stopPropagation();
$(e.currentTarget).trigger("click");