diff options
| author | Nicolas Lempereur <nle@odoo.com> | 2021-02-19 14:10:58 +0000 |
|---|---|---|
| committer | Nicolas Lempereur <nle@odoo.com> | 2021-02-19 14:13:58 +0000 |
| commit | 2c0aa825ee54ed674ff9f43722031df8e2f35ca6 (patch) | |
| tree | e63ffbcef3dfa5bc08f62314ad498ac8cdf6f16d /addons/web_editor/static/src | |
| parent | 49a57dd5b34b66733564b31ed861fe9bfcbda2b3 (diff) | |
[FIX] web_editor: no error background position + ctrl Z
Scenario:
- start editing background position
- press TAB key
- press CTRL + Z
=> traceback
Why:
Restoring a snapshot with CTRL Z can send a click event with target not
wrapped in a jQuery object which was not expected by the code.
reported in https://github.com/odoo/odoo/pull/66462#issuecomment-782025417
opw-2423445
closes odoo/odoo#66540
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Diffstat (limited to 'addons/web_editor/static/src')
| -rw-r--r-- | addons/web_editor/static/src/js/editor/snippets.options.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/addons/web_editor/static/src/js/editor/snippets.options.js b/addons/web_editor/static/src/js/editor/snippets.options.js index 9b3baae8f8e..cbf8ffb7b6b 100644 --- a/addons/web_editor/static/src/js/editor/snippets.options.js +++ b/addons/web_editor/static/src/js/editor/snippets.options.js @@ -4455,7 +4455,7 @@ registry.BackgroundPosition = SnippetOptionWidget.extend({ * @private */ _onDocumentClicked: function (ev) { - if (!ev.target.closest('.o_we_background_position_overlay')) { + if (!$(ev.target).closest('.o_we_background_position_overlay')) { this._toggleBgOverlay(false); } }, |
