From 7cca8c6e61b32e47c58ad3783ae717e9da737672 Mon Sep 17 00:00:00 2001 From: Jack Sleight Date: Fri, 5 Jul 2024 19:15:31 +0100 Subject: [PATCH] [5.x] Fix dirty state after entry action or revision publish (#10381) --- resources/js/components/entries/PublishForm.vue | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/resources/js/components/entries/PublishForm.vue b/resources/js/components/entries/PublishForm.vue index d56dbc390c..a826c64640 100644 --- a/resources/js/components/entries/PublishForm.vue +++ b/resources/js/components/entries/PublishForm.vue @@ -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; @@ -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;