A platform for community discussion. Free, open, simple.
FIX: attempts to observe preview mutation asap (#14590)
Joffrey JAFFEUXb59c41925332
diff --git a/app/assets/javascripts/discourse/app/components/d-editor.js b/app/assets/javascripts/discourse/app/components/d-editor.jsindex a67af2c6d25..ac3e9a184ce 100644--- a/app/assets/javascripts/discourse/app/components/d-editor.js+++ b/app/assets/javascripts/discourse/app/components/d-editor.js@@ -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",