mirror of
https://github.com/zulip/zulip.git
synced 2025-11-15 19:31:58 +00:00
hotkey: Add 'delete' to delete focused draft.
This commit is contained in:
committed by
Tim Abbott
parent
f3413d3b59
commit
3b92f6115a
@@ -365,7 +365,7 @@ exports.drafts_handle_events = function (e, event_key) {
|
||||
var elt = document.activeElement;
|
||||
var focused_draft = $(elt.parentElement)[0].getAttribute("data-draft-id");
|
||||
// Allows user to delete drafts with backspace
|
||||
if (event_key === "backspace") {
|
||||
if (event_key === "backspace" || event_key === "delete") {
|
||||
if (elt.parentElement.hasAttribute("data-draft-id")) {
|
||||
var focus_draft_back_row = $(elt)[0].parentElement;
|
||||
var backnext_focus_draft_row = $(focus_draft_back_row).next();
|
||||
|
||||
Reference in New Issue
Block a user