diff --git a/assets/javascripts/wizard-custom.js b/assets/javascripts/wizard-custom.js index 53de1fe5..826cdf2d 100644 --- a/assets/javascripts/wizard-custom.js +++ b/assets/javascripts/wizard-custom.js @@ -35,6 +35,7 @@ //= require discourse/app/components/date-time-input //= require discourse/app/components/text-field //= require discourse/app/components/d-textarea +//= require discourse/app/components/popup-input-tip //= require discourse/app/templates/components/conditional-loading-spinner //= require discourse/app/templates/components/d-button diff --git a/assets/javascripts/wizard/components/wizard-composer-editor.js.es6 b/assets/javascripts/wizard/components/wizard-composer-editor.js.es6 index 1356f6ac..faada1f4 100644 --- a/assets/javascripts/wizard/components/wizard-composer-editor.js.es6 +++ b/assets/javascripts/wizard/components/wizard-composer-editor.js.es6 @@ -4,7 +4,7 @@ import { on, } from "discourse-common/utils/decorators"; import { findRawTemplate } from "discourse-common/lib/raw-templates"; -import { scheduleOnce, throttle } from "@ember/runloop"; +import { scheduleOnce } from "@ember/runloop"; import { caretPosition, inCodeBlock } from "discourse/lib/utilities"; import highlightSyntax from "discourse/lib/highlight-syntax"; import { alias } from "@ember/object/computed"; @@ -30,7 +30,6 @@ export default ComposerEditor.extend({ @on("didInsertElement") _composerEditorInit() { const $input = $(this.element.querySelector(".d-editor-input")); - const $preview = $(this.element.querySelector(".d-editor-preview-wrapper")); if (this.siteSettings.enable_mentions) { $input.autocomplete({ @@ -72,14 +71,7 @@ export default ComposerEditor.extend({ }); } - if (this._enableAdvancedEditorPreviewSync()) { - this._initInputPreviewSync($input, $preview); - } else { - $input.on("scroll", () => - throttle(this, this._syncEditorAndPreviewScroll, $input, $preview, 20) - ); - } - + $input.on("scroll", this._throttledSyncEditorAndPreviewScroll); this._bindUploadTarget(); const wizardEventNames = ["insert-text", "replace-text"]; diff --git a/assets/stylesheets/wizard/wizard_custom.scss b/assets/stylesheets/wizard/wizard_custom.scss index c826bcf7..659c97f5 100644 --- a/assets/stylesheets/wizard/wizard_custom.scss +++ b/assets/stylesheets/wizard/wizard_custom.scss @@ -6,6 +6,7 @@ @import "common/components/buttons"; @import "common/d-editor"; @import "desktop/modal"; +@import "common/input_tip"; @import "custom/base"; @import "custom/wizard";