mirror of
https://github.com/cryptpad/cryptpad.git
synced 2026-09-14 11:05:41 +05:00
Add escape key to prevent keyboard trap inside description editor
This commit is contained in:
parent
eaf55e01cd
commit
75c0bf0d26
@ -498,6 +498,13 @@ define([
|
||||
editor.setOption('readOnly', false);
|
||||
cm.configureTheme(common, function () {});
|
||||
|
||||
editor.on("keydown", function (cm, event) {
|
||||
if (event.key === "Escape") {
|
||||
cm.getInputField().blur();
|
||||
event.preventDefault();
|
||||
}
|
||||
});
|
||||
|
||||
var markdownTb = common.createMarkdownToolbar(editor);
|
||||
$(code).prepend(markdownTb.toolbar);
|
||||
$(markdownTb.toolbar).show();
|
||||
|
||||
Loading…
Reference in New Issue
Block a user