mirror of
https://github.com/discourse/discourse.git
synced 2024-11-29 12:13:58 -06:00
Sync editor and preview when preview is updated.
This commit is contained in:
parent
03eb278034
commit
5b965ab5d0
@ -144,14 +144,6 @@ export default Ember.Component.extend({
|
||||
$input.on('scroll', () => {
|
||||
this._syncScroll(this._syncEditorAndPreviewScroll, $input, $preview);
|
||||
});
|
||||
|
||||
$input.on('keypress', () => {
|
||||
Ember.run.debounce(
|
||||
this,
|
||||
this._syncScroll, this._syncEditorAndPreviewScroll, $input, $preview,
|
||||
200
|
||||
);
|
||||
});
|
||||
});
|
||||
|
||||
$preview.on('touchstart mouseenter', () => {
|
||||
@ -727,6 +719,7 @@ export default Ember.Component.extend({
|
||||
Ember.run.debounce(this, this._loadInlineOneboxes, inline, 450);
|
||||
}
|
||||
|
||||
this._syncScroll(this._syncEditorAndPreviewScroll, this.$('.d-editor-input'), $preview);
|
||||
this.trigger('previewRefreshed', $preview);
|
||||
this.sendAction('afterRefresh', $preview);
|
||||
},
|
||||
|
@ -11,7 +11,8 @@
|
||||
validation=validation
|
||||
loading=composer.loading
|
||||
forcePreview=forcePreview
|
||||
composerEvents=true}}
|
||||
composerEvents=true
|
||||
autofocus=true}}
|
||||
|
||||
{{#if site.mobileView}}
|
||||
<input type="file" id="mobile-uploader" multiple />
|
||||
|
Loading…
Reference in New Issue
Block a user