From fe6a45945a34b03ef842cc863173f7f3758e5e04 Mon Sep 17 00:00:00 2001 From: jvm-odoo Date: Fri, 7 Feb 2020 12:41:11 +0000 Subject: [PATCH] [FIX] web_editor: trigger content_changed when updating alt or title Issue - Install Website - Go on your website - Add text block with image - Change ONLY the image's alt and/or the image's title text - Save dialog - Save page Not saved Cause The element doesn't become dirty after changes in alt dialog. Solution Trigger content_changed to make the element become dirty. OPW-2189909 closes odoo/odoo#44885 X-original-commit: 4f1712075fbc4d95d83690fbcfe72f9b72260254 Signed-off-by: Nicolas Lempereur (nle) --- addons/web_editor/static/src/js/wysiwyg/widgets/alt_dialog.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/web_editor/static/src/js/wysiwyg/widgets/alt_dialog.js b/addons/web_editor/static/src/js/wysiwyg/widgets/alt_dialog.js index 98abc75f6c1..80f143b646c 100644 --- a/addons/web_editor/static/src/js/wysiwyg/widgets/alt_dialog.js +++ b/addons/web_editor/static/src/js/wysiwyg/widgets/alt_dialog.js @@ -51,7 +51,7 @@ var AltDialog = Dialog.extend({ var allNonEscQuots = /"/g; $(this.media).attr('alt', alt ? alt.replace(allNonEscQuots, """) : null) .attr('title', title ? title.replace(allNonEscQuots, """) : null); - + $(this.media).trigger('content_changed'); this.final_data = this.media; return this._super.apply(this, arguments); },