diff options
| author | qsm-odoo <qsm@odoo.com> | 2020-02-06 17:02:11 +0000 |
|---|---|---|
| committer | qsm-odoo <qsm@odoo.com> | 2020-02-07 12:43:25 +0000 |
| commit | ef03b02af6f9f5003b85fa5fda56a27923e2214c (patch) | |
| tree | e6f50713fcfd544c5d3f263754bbe67aa84eaf4e /addons/website_form/static | |
| parent | 91fb0d302090dcbf851ad3b807bf0dd091653a7a (diff) | |
[FIX] web_editor, website, *: editor `notify` method must be synchronous
* website_form
Some technical explanations:
The method became async because the `setTarget` call which was in there
became `async` since it performed an UI update. As this method being
async is a problem with some snippets, it is best to keep it synchronous
for now. For this, the UI update in `setTarget` is removed and becomes
the responsibility of the caller. Nothing relied on it except one code,
which is solved by calling `onFocus` before the UI update which occurs
on focus, as it is already the case in master.
closes odoo/odoo#44850
X-original-commit: 53bba0660237abbcadc9675fd89ec94a2a31e130
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Diffstat (limited to 'addons/website_form/static')
| -rw-r--r-- | addons/website_form/static/src/snippets/s_website_form/options.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/addons/website_form/static/src/snippets/s_website_form/options.js b/addons/website_form/static/src/snippets/s_website_form/options.js index 9a69b3efcda..2e9e48930d2 100644 --- a/addons/website_form/static/src/snippets/s_website_form/options.js +++ b/addons/website_form/static/src/snippets/s_website_form/options.js @@ -403,8 +403,8 @@ options.registry.WebsiteFormEditor = FormEditor.extend({ /** * @override */ - notify: async function (name, data) { - await this._super(...arguments); + notify: function (name, data) { + this._super(...arguments); if (name === 'field_mark') { this._setLabelsMark(); } else if (name === 'add_field') { |
