summaryrefslogtreecommitdiff
path: root/addons/web_editor/static/src/js/snippets.editor.js
diff options
context:
space:
mode:
authorChristophe Simonis <chs@odoo.com>2016-11-08 15:01:20 +0100
committerChristophe Simonis <chs@odoo.com>2016-11-08 15:01:20 +0100
commit3d085f632d4c5a8aece92731494e1dbbc8923049 (patch)
tree373dc715bb2f38482300fd66b1fb022104173b98 /addons/web_editor/static/src/js/snippets.editor.js
parent74ef15f01f123bc4adbfdaeb3d20b6c77341492a (diff)
parent63860373acb47356c7731cbc8258af0fd7fd9da4 (diff)
[MERGE] forward port branch saas-12 up to 6386037
Diffstat (limited to 'addons/web_editor/static/src/js/snippets.editor.js')
-rw-r--r--addons/web_editor/static/src/js/snippets.editor.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/addons/web_editor/static/src/js/snippets.editor.js b/addons/web_editor/static/src/js/snippets.editor.js
index dcfabb6feb4..4ddda0c838e 100644
--- a/addons/web_editor/static/src/js/snippets.editor.js
+++ b/addons/web_editor/static/src/js/snippets.editor.js
@@ -1032,12 +1032,12 @@ data.Editor = Class.extend({
if($parent.closest(":data(\"snippet-editor\")").length) {
while (!$parent.data("snippet-editor")) {
var $nextParent = $parent.parent();
- if ($parent.children().length === 0 && $parent.text().trim() === "") {
+ if ($parent.children().length === 0 && $parent.text().trim() === "" && !$parent.hasClass("oe_structure")) {
$parent.remove();
}
$parent = $nextParent;
}
- if ($parent.children().length === 0 && $parent.text().trim() === "") {
+ if ($parent.children().length === 0 && $parent.text().trim() === "" && !$parent.hasClass("oe_structure")) {
_.defer(function () {
$parent.data("snippet-editor").on_remove();
});