Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
click_handlers: Use e.key instead of deprecated e.which.
Priyank Patel98cb0e339cd3
diff --git a/static/js/click_handlers.js b/static/js/click_handlers.jsindex d2f8ca54ac8..83452c7176c 100644--- a/static/js/click_handlers.js+++ b/static/js/click_handlers.js@@ -782,12 +782,12 @@ export function initialize() {$(document).on("keydown", ".editable-section", function (e) {e.stopPropagation();// Cancel editing description if Escape key is pressed.- if (e.which === 27) {+ if (e.key === "Escape") {$("[data-finish-editing='.stream-description-editable']").hide();$(this).attr("contenteditable", false);$(this).text($(this).attr("data-prev-text"));$("[data-make-editable]").html("");- } else if (e.which === 13) {+ } else if (e.key === "Enter") {$(this).siblings(".checkmark").trigger("click");}});