summaryrefslogtreecommitdiff
path: root/addons/web_editor/static/src
diff options
context:
space:
mode:
authorSamuel Degueldre <sad@odoo.com>2020-03-03 09:54:01 +0000
committerSamuel Degueldre <sad@odoo.com>2020-03-03 11:28:16 +0000
commit56cddd70d15174d09d56b8fe6f8f895fd178286c (patch)
tree7ef45a50b7529401a6cec93b09ee4b23978cf446 /addons/web_editor/static/src
parenta37a82cbcd1ad802bc77b8e5fa6cfaa95259c659 (diff)
[FIX] web_editor: stop snippet editors from finding widget in parent
Because of the event propagating to an option's parent, a snippet option requesting a uservalue widget would also get back the corresponding widgets on the parent snippetEditor, this has the potential to cause unforeseen problems. This commit fixes that by stopping the event's propagation. closes odoo/odoo#46724 X-original-commit: 1441b3c2f4f935771b3210be82f7b471aa028b64 Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Diffstat (limited to 'addons/web_editor/static/src')
-rw-r--r--addons/web_editor/static/src/js/editor/snippets.editor.js1
1 files changed, 1 insertions, 0 deletions
diff --git a/addons/web_editor/static/src/js/editor/snippets.editor.js b/addons/web_editor/static/src/js/editor/snippets.editor.js
index 9d11a7ac4c7..5afbe1cedfc 100644
--- a/addons/web_editor/static/src/js/editor/snippets.editor.js
+++ b/addons/web_editor/static/src/js/editor/snippets.editor.js
@@ -774,6 +774,7 @@ var SnippetEditor = Widget.extend({
* @param {Event} ev
*/
_onUserValueWidgetRequest: function (ev) {
+ ev.stopPropagation();
for (const key of Object.keys(this.styles)) {
const widget = this.styles[key].findWidget(ev.data.name);
if (widget) {