A platform for community discussion. Free, open, simple.
FIX: Flashing history modal when changing versions (#22785)
Isaac Janzena5b810fe18e8
diff --git a/app/assets/javascripts/discourse/app/components/modal/history.hbs b/app/assets/javascripts/discourse/app/components/modal/history.hbsindex ebe00483c63..1ce8e17587c 100644--- a/app/assets/javascripts/discourse/app/components/modal/history.hbs+++ b/app/assets/javascripts/discourse/app/components/modal/history.hbs@@ -4,7 +4,7 @@class="history-modal"><:body>- <ConditionalLoadingSpinner @condition={{this.loading}}>+ <ConditionalLoadingSpinner @condition={{this.initialLoad}}><Modal::History::Revision@model={{this.postRevision}}@mobileView={{this.site.mobileView}}diff --git a/app/assets/javascripts/discourse/app/components/modal/history.js b/app/assets/javascripts/discourse/app/components/modal/history.jsindex 814bccddda7..069da8ea109 100644--- a/app/assets/javascripts/discourse/app/components/modal/history.js+++ b/app/assets/javascripts/discourse/app/components/modal/history.js@@ -29,6 +29,7 @@ export default class History extends Component {@tracked postRevision;@tracked viewMode = this.site?.mobileView ? "inline" : "side_by_side";@tracked bodyDiff;+ @tracked initialLoad = true;constructor() {super(...arguments);@@ -171,6 +172,7 @@ export default class History extends Component {Post.loadRevision(postId, postVersion).then((result) => {this.postRevision = result;this.loading = false;+ this.initialLoad = false;});}