From 3d4060f7568a061db596fbc1fd9925e3924a79e5 Mon Sep 17 00:00:00 2001 From: qsm-odoo Date: Fri, 27 Sep 2019 15:24:30 +0000 Subject: [PATCH] [FIX] web_editor: do not redraw option hierarchy on click Before this commit, when a hierarchy of options was displayed in the editor left panel and that the user click on any one, the related snippet was enabled making all the children options disappear (like the "go to parent" button in the old UI). Now we only keep this behavior when we click on the title of the snippet's options. closes odoo/odoo#37538 Signed-off-by: Quentin Smetz (qsm) --- addons/web_editor/static/src/js/editor/snippets.editor.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 74cf4ce7040..775165354ea 100644 --- a/addons/web_editor/static/src/js/editor/snippets.editor.js +++ b/addons/web_editor/static/src/js/editor/snippets.editor.js @@ -354,7 +354,7 @@ var SnippetEditor = Widget.extend({ })).data('editor', this); $optionsSection.on('mouseover', this._onOptionsSectionMouseOver.bind(this)); $optionsSection.on('mouseleave', this._onOptionsSectionMouseLeave.bind(this)); - $optionsSection.on('click', this._onOptionsSectionClick.bind(this)); + $optionsSection.on('click', 'we-title > span', this._onOptionsSectionClick.bind(this)); $optionsSection.on('click', '.oe_snippet_clone', this._onCloneClick.bind(this)); $optionsSection.on('click', '.oe_snippet_remove', this._onRemoveClick.bind(this)); this._customize$Elements.push($optionsSection);