From b2daf688e52c0ae2b19b6ccf85559c04762e391b Mon Sep 17 00:00:00 2001
From: divy-odoo <divy@odoo.com>
Date: Thu, 4 May 2023 12:45:26 +0000
Subject: [PATCH] [FIX] website_blog: fix size options values when blog regular
 cover

Before this commit, the widget value was updated (based on the current
state) prior to updating the snippet UI. As a result, the widget value
reflected used the non-updated UI labels.

task-3112890

closes odoo/odoo#120569

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
---
 addons/website_blog/static/src/js/website_blog.editor.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/addons/website_blog/static/src/js/website_blog.editor.js b/addons/website_blog/static/src/js/website_blog.editor.js
index 95daa0fba985..970092f85014 100644
--- a/addons/website_blog/static/src/js/website_blog.editor.js
+++ b/addons/website_blog/static/src/js/website_blog.editor.js
@@ -180,7 +180,6 @@ options.registry.CoverProperties.include({
      * @override
      */
     updateUI: async function () {
-        await this._super(...arguments);
         var isRegularCover = this.$target.is('.o_wblog_post_page_cover_regular');
         var $coverFull = this.$el.find('[data-select-class*="o_full_screen_height"]');
         var $coverMid = this.$el.find('[data-select-class*="o_half_screen_height"]');
@@ -191,6 +190,7 @@ options.registry.CoverProperties.include({
         $coverFull.children('div').text(isRegularCover ? _t("Large") : this._coverFullOriginalLabel);
         $coverMid.children('div').text(isRegularCover ? _t("Medium") : this._coverMidOriginalLabel);
         $coverAuto.children('div').text(isRegularCover ? _t("Tiny") : this._coverAutoOriginalLabel);
+        return this._super(...arguments);
     },
 });
 
-- 
GitLab