Skip to content

Commit

Permalink
[5.x] Fix dirty state after entry action or revision publish (#10381)
Browse files Browse the repository at this point in the history
  • Loading branch information
jacksleight authored Jul 5, 2024
1 parent 3c52d88 commit 7cca8c6
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions resources/js/components/entries/PublishForm.vue
Original file line number Diff line number Diff line change
Expand Up @@ -768,7 +768,10 @@ export default {
this.isWorkingCopy = isWorkingCopy;
this.confirmingPublish = false;
this.title = response.data.data.title;
clearTimeout(this.trackDirtyStateTimeout);
this.trackDirtyState = false;
this.values = this.resetValuesFromResponse(response.data.data.values);
this.trackDirtyStateTimeout = setTimeout(() => (this.trackDirtyState = true), 350);
this.activeLocalization.title = response.data.data.title;
this.activeLocalization.published = response.data.data.published;
this.activeLocalization.status = response.data.data.status;
Expand Down Expand Up @@ -816,7 +819,10 @@ export default {
if (response.data) {
this.title = response.data.title;
if (!this.revisionsEnabled) this.permalink = response.data.permalink;
clearTimeout(this.trackDirtyStateTimeout);
this.trackDirtyState = false;
this.values = this.resetValuesFromResponse(response.data.values);
this.trackDirtyStateTimeout = setTimeout(() => (this.trackDirtyState = true), 350);
this.initialPublished = response.data.published;
this.activeLocalization.published = response.data.published;
this.activeLocalization.status = response.data.status;
Expand Down

0 comments on commit 7cca8c6

Please sign in to comment.