summaryrefslogtreecommitdiff
path: root/addons/web_editor
diff options
context:
space:
mode:
authorKrupa Patel <kup@odoo.com>2020-03-11 05:53:15 +0000
committerqsm-odoo <qsm@odoo.com>2020-03-11 10:18:30 +0000
commit703a9c48e910577cad3feb2e07f2d4fa1ae4ca2a (patch)
treeae4b5d2b35b6f57954054cad64f09d3b07fe7615 /addons/web_editor
parent5d8367747cddb8663b89f4c7b16c4fbae85d66ce (diff)
[FIX] web_editor: close widgets by clicking outside of them
task-2196789 closes odoo/odoo#46298 Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Diffstat (limited to 'addons/web_editor')
-rw-r--r--addons/web_editor/static/src/js/editor/snippets.editor.js3
1 files changed, 3 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 26c2912b242..4845aab8da5 100644
--- a/addons/web_editor/static/src/js/editor/snippets.editor.js
+++ b/addons/web_editor/static/src/js/editor/snippets.editor.js
@@ -917,6 +917,9 @@ var SnippetsMenu = Widget.extend({
});
var $target = $(srcElement);
+ if (!$target.closest('we-button, we-toggler, .o_we_color_preview').length) {
+ this._closeWidgets();
+ }
if (!$target.closest('body > *').length) {
return;
}