Enh #47: Edit code block in codemirror (#6452)

- Fixed mouse clicking on elements outside the code block
This commit is contained in:
yuriimaz 2023-07-25 20:31:44 +03:00 committed by GitHub
parent 640a6693d2
commit f4d86ef2fd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -66,15 +66,8 @@ humhub.module('ui.richtext.prosemirror', function (module, require, $) {
that.getInput().val(that.editor.serialize()).trigger('blur');
}).on('clear', function () {
that.editor.clear();
}).on('focus', function () {
that.focus();
});
this.$.find('.humhub-ui-richtext').on('focus', function () {
that.focus();
that.getInput().val(that.editor.serialize()).trigger('blur');
})
if (this.options.backupInterval) {
setInterval(() => this.backup(), this.options.backupInterval * 1000);
event.on('humhub:content:afterSubmit', () => this.resetBackup());