From 703a9c48e910577cad3feb2e07f2d4fa1ae4ca2a Mon Sep 17 00:00:00 2001 From: Krupa Patel Date: Wed, 11 Mar 2020 05:53:15 +0000 Subject: [PATCH] [FIX] web_editor: close widgets by clicking outside of them task-2196789 closes odoo/odoo#46298 Signed-off-by: Quentin Smetz (qsm) --- addons/web_editor/static/src/js/editor/snippets.editor.js | 3 +++ 1 file changed, 3 insertions(+) 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; }