DEV: do not process composer preview when collapsed (#13941)
This commit is contained in:
parent
11668ee85b
commit
5b85b254db
|
@ -74,6 +74,7 @@ export default Component.extend(ComposerUpload, {
|
|||
|
||||
shouldBuildScrollMap: true,
|
||||
scrollMap: null,
|
||||
processPreview: true,
|
||||
|
||||
uploadMarkdownResolvers,
|
||||
uploadProcessorActions,
|
||||
|
|
|
@ -252,6 +252,7 @@ export default Component.extend({
|
|||
emojiPickerIsActive: false,
|
||||
emojiStore: service("emoji-store"),
|
||||
isEditorFocused: false,
|
||||
processPreview: true,
|
||||
|
||||
@discourseComputed("placeholder")
|
||||
placeholderTranslated(placeholder) {
|
||||
|
@ -387,7 +388,7 @@ export default Component.extend({
|
|||
},
|
||||
|
||||
_updatePreview() {
|
||||
if (this._state !== "inDOM") {
|
||||
if (this._state !== "inDOM" || !this.processPreview) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -453,7 +454,7 @@ export default Component.extend({
|
|||
});
|
||||
},
|
||||
|
||||
@observes("ready", "value")
|
||||
@observes("ready", "value", "processPreview")
|
||||
_watchForChanges() {
|
||||
if (!this.ready) {
|
||||
return;
|
||||
|
|
|
@ -8,6 +8,7 @@
|
|||
importQuote=(action "importQuote")
|
||||
showUploadModal=showUploadModal
|
||||
togglePreview=(action "togglePreview")
|
||||
processPreview=processPreview
|
||||
validation=validation
|
||||
loading=composer.loading
|
||||
forcePreview=forcePreview
|
||||
|
|
|
@ -127,6 +127,7 @@
|
|||
cannotSeeMention=(action "cannotSeeMention")
|
||||
importQuote=(action "importQuote")
|
||||
togglePreview=(action "togglePreview")
|
||||
processPreview=showPreview
|
||||
showToolbar=showToolbar
|
||||
afterRefresh=(action "afterRefresh")
|
||||
focusTarget=focusTarget}}
|
||||
|
|
Loading…
Reference in New Issue