mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-24 03:14:03 +03:00
🐛 Fixed slug saving in editor (#16007)
refs TryGhost/Team#2294 - If user enter the slug name and then leave the post page, we should wait until the slug would be saved on backend. The problem can be reproduced with slow internet connection.
This commit is contained in:
parent
270f288c48
commit
00c2b71502
@ -788,6 +788,14 @@ export default class EditorController extends Controller {
|
||||
this._koenig.cleanup();
|
||||
}
|
||||
|
||||
// user can enter the slug name and then leave the post page,
|
||||
// in such case we should wait until the slug would be saved on backend
|
||||
if (this.updateSlugTask.isRunning) {
|
||||
transition.abort();
|
||||
await this.updateSlugTask.last;
|
||||
return transition.retry();
|
||||
}
|
||||
|
||||
let hasDirtyAttributes = this.hasDirtyAttributes;
|
||||
let state = post.getProperties('isDeleted', 'isSaving', 'hasDirtyAttributes', 'isNew');
|
||||
|
||||
|
@ -791,6 +791,14 @@ export default class LexicalEditorController extends Controller {
|
||||
// this._koenig.cleanup();
|
||||
// }
|
||||
|
||||
// user can enter the slug name and then leave the post page,
|
||||
// in such case we should wait until the slug would be saved on backend
|
||||
if (this.updateSlugTask.isRunning) {
|
||||
transition.abort();
|
||||
await this.updateSlugTask.last;
|
||||
return transition.retry();
|
||||
}
|
||||
|
||||
let hasDirtyAttributes = this.hasDirtyAttributes;
|
||||
let state = post.getProperties('isDeleted', 'isSaving', 'hasDirtyAttributes', 'isNew');
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user