summaryrefslogtreecommitdiff
path: root/addons/website/static/src/js/editor/editor_menu.js
diff options
context:
space:
mode:
authorChristophe Matthieu <chm@odoo.com>2019-02-14 15:46:27 +0000
committerChristophe Matthieu <chm@odoo.com>2019-02-18 09:45:38 +0000
commitb7818fe036d84ccb67828edafa47a5194cb91d4c (patch)
tree69d7aad8c57a8d33789945606181cb9483f40063 /addons/website/static/src/js/editor/editor_menu.js
parente096dc9b6685b369d036b0a524ba006733263581 (diff)
[FIX] website: don't not edit not editable contents or branded hr, br...
Diffstat (limited to 'addons/website/static/src/js/editor/editor_menu.js')
-rw-r--r--addons/website/static/src/js/editor/editor_menu.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/addons/website/static/src/js/editor/editor_menu.js b/addons/website/static/src/js/editor/editor_menu.js
index 19cffd3f3aa..0e967b2f679 100644
--- a/addons/website/static/src/js/editor/editor_menu.js
+++ b/addons/website/static/src/js/editor/editor_menu.js
@@ -136,12 +136,14 @@ var EditorMenu = Widget.extend({
return $wrapwrap.find('[data-oe-model]')
.not('.o_not_editable')
.filter(function () {
- return !$(this).closest('.o_not_editable').length;
+ var $parent = $(this).closest('.o_editable, .o_not_editable');
+ return !$parent.length || $parent.hasClass('o_editable');
})
.not('link, script')
.not('[data-oe-readonly]')
.not('img[data-oe-field="arch"], br[data-oe-field="arch"], input[data-oe-field="arch"]')
.not('.oe_snippet_editor')
+ .not('hr, br, input, textarea')
.add('.o_editable');
},