mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-02-17 23:44:39 -05:00
🐛 Fixed editor cards sometimes being removed as soon as they are added
no issue When adding cards to the editor, especially image cards, we were seeing the cards removed instantaneously or whilst the file dialog was open making it appear that nothing had happened after selecting the card in the menu or selecting a file. - as part of the publish flow workflow we extracted the pre-save routine into a separate task so that it could be triggered from external components - one of the pre-save routine actions was to trigger an editor cleanup that removes empty cards and trailing paragraphs _but_ it should only do that when not performing a background save that occurs on any change to the post contents for drafts - the problem arose from the background saves because the `options` argument was never passed through to the `beforeSaveTask` call meaning every save looked like a full save and performed editor cleanup resulting in unexpected removal of empty cards that had just been created
This commit is contained in:
parent
15b06fce2a
commit
ffdbde8eed
1 changed files with 1 additions and 1 deletions
|
@ -468,7 +468,7 @@ export default class EditorController extends Controller {
|
|||
// new publishing flow sets the post status manually on publish
|
||||
this.set('post.status', status);
|
||||
|
||||
yield this.beforeSaveTask.perform();
|
||||
yield this.beforeSaveTask.perform(options);
|
||||
|
||||
try {
|
||||
let post = yield this._savePostTask.perform(options);
|
||||
|
|
Loading…
Add table
Reference in a new issue