[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) <nle@odoo.com>
This commit is contained in:
jvm-odoo
2020-02-07 15:04:57 +00:00
parent ef4bf7c936
commit fe6a45945a
@@ -51,7 +51,7 @@ var AltDialog = Dialog.extend({
var allNonEscQuots = /"/g;
$(this.media).attr('alt', alt ? alt.replace(allNonEscQuots, "&quot;") : null)
.attr('title', title ? title.replace(allNonEscQuots, "&quot;") : null);
$(this.media).trigger('content_changed');
this.final_data = this.media;
return this._super.apply(this, arguments);
},