[FIX] mass_mailing: restore save on blur

Commit [1] defined a value for the `onWysiwygBlur` option of `Wysiwyg`
in the `mass_mailing` `html field`. This had the side effect of
overriding the value set by its parent `html field`, which was to call
`commitChanges`. As a result, the `mass_mailing` `html field` was not
saving its content on blur. This restores that behavior by explicitly
adding the call to `commitChanges` where it was missing.

[1]: https://github.com/odoo/odoo/commit/e212e873eb35eb9b9a931fb1521109475c008074

task-3288881

closes odoo/odoo#121231

X-original-commit: 817d494e4eaa29983f75d4f3d6754ef3c3cc6e51
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
Signed-off-by: Antoine Guenet (age) <age@odoo.com>
This commit is contained in:
Antoine Guenet
2023-05-12 09:21:55 +02:00
parent 8e8f1be6a7
commit a6568a69db
@@ -50,7 +50,10 @@ export class MassMailingHtmlField extends HtmlField {
resizable: false,
defaultDataForLinkTools: { isNewWindow: true },
toolbarTemplate: 'mass_mailing.web_editor_toolbar',
onWysiwygBlur: () => this.wysiwyg.odooEditor.toolbarHide(),
onWysiwygBlur: () => {
this.commitChanges();
this.wysiwyg.odooEditor.toolbarHide();
},
...this.props.wysiwygOptions,
};
}