hotkey: Fix escape key when editing topic.

Apparently, the changes in fe2adeeee1 to
fix a Firefox focus bug accidentally had the side effect of removing
the topic text box from the area being considered, resulting in the
escape key no longer working to end the message edit from within that
text box.
This commit is contained in:
Tim Abbott 2019-09-26 12:53:49 -07:00
parent 1c81538570
commit 2756706149
1 changed files with 2 additions and 1 deletions

View File

@ -215,7 +215,8 @@ exports.process_escape_key = function (e) {
// Using this definition of "row" instead of "current_msg_list.selected_row()" // Using this definition of "row" instead of "current_msg_list.selected_row()"
// because it returns a more complete object. // because it returns a more complete object.
// Necessary for refocusing on message list in Firefox. // Necessary for refocusing on message list in Firefox.
row = $(".message_edit_content").filter(":focus").closest(".message_row"); var message_edit_inputs = $(".message_edit_content, .message_edit_topic");
row = message_edit_inputs.filter(":focus").closest(".message_row");
row.find('.message_edit_content').blur(); row.find('.message_edit_content').blur();
message_edit.end(row); message_edit.end(row);
return true; return true;