bug fix: Blur message edit textboxes when hitting escape.

We have a somewhat janky mechanism for rendering message edits,
and before this fix, we were not unblurring the text boxes when
we closed the message editing session with the escape key, which
made it so that the escape key was unusable.
This commit is contained in:
Steve Howell 2017-03-12 12:00:22 -07:00 committed by Tim Abbott
parent f9d26856e8
commit cfcad48e46
1 changed files with 2 additions and 0 deletions

View File

@ -170,12 +170,14 @@ exports.process_escape_key = function (e) {
if (exports.processing_text()) {
if ($(".message_edit_content").filter(":focus").length > 0) {
row = $(".message_edit_content").filter(":focus").closest(".message_row");
row.find('.message_edit_content').blur();
message_edit.end(row);
return true;
}
if ($(".message_edit_topic").filter(":focus").length > 0) {
row = $(".message_edit_topic").filter(":focus").closest(".message_row");
row.find('.message_edit_topic').blur();
message_edit.end(row);
return true;
}