FIX: attempts to observe preview mutation asap (#14590)

This commit is contained in:
Joffrey JAFFEUX 2021-10-13 09:28:55 +02:00 committed by GitHub
parent 00e8baffa2
commit b59c419253
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -263,6 +263,8 @@ export default Component.extend(TextareaTextManipulation, {
didInsertElement() {
this._super(...arguments);
this._previewMutationObserver = this._disablePreviewTabIndex();
this._textarea = this.element.querySelector("textarea.d-editor-input");
this._$textarea = $(this._textarea);
this._applyEmojiAutocomplete(this._$textarea);
@ -281,8 +283,6 @@ export default Component.extend(TextareaTextManipulation, {
});
});
this._previewMutationObserver = this._disablePreviewTabIndex();
// disable clicking on links in the preview
$(this.element.querySelector(".d-editor-preview")).on(
"click.preview",