streams: Add hotkey for content-editable enter.

When you enter, it should click the checkmark, which would save the
current input of the input section.
This commit is contained in:
Brock Whittaker
2017-03-22 12:10:15 -07:00
committed by Tim Abbott
parent d21fe68e9e
commit dbcd19bcfa

View File

@@ -470,6 +470,8 @@ $(function () {
$(this).attr("contenteditable", false); $(this).attr("contenteditable", false);
$(this).text($(this).attr("data-prev-text")); $(this).text($(this).attr("data-prev-text"));
$("[data-make-editable]").html(""); $("[data-make-editable]").html("");
} else if (e.which === 13) {
$(this).siblings(".checkmark").click();
} }
}); });