[FIX] web_editor: prevents dropping a snippet in a non-editable area
Before this commit, it was possible to drop a snippet in a non-editable area (e.g. dynamic snippets). Steps to reproduce the bug: - Drop a "Dynamic Products" snippet in a page. - Drop a "Columns" snippet in the same page. - Moves a column from the "Columns" snippet into the "Dynamic Products" snippet thanks to the "drag and drop" button. - Bugs => It works when it shouldn't. task-3054763 closes odoo/odoo#113796 X-original-commit: 4d61c356b7deed7fd0b01cb817c274afe384c0ac Signed-off-by: Arthur Detroux (ard) <ard@odoo.com>
This commit is contained in:
@@ -2327,7 +2327,7 @@ var SnippetsMenu = Widget.extend({
|
||||
$selectorSiblings = $(_.uniq(($selectorSiblings || $()).add($selectorChildren.children()).get()));
|
||||
}
|
||||
|
||||
var noDropZonesSelector = '[data-invisible="1"], .o_we_no_overlay, :not(:visible)';
|
||||
var noDropZonesSelector = '[data-invisible="1"], .o_we_no_overlay, :not(:visible), :not(:o_editable)';
|
||||
if ($selectorSiblings) {
|
||||
$selectorSiblings.not(`.oe_drop_zone, .oe_drop_clone, ${noDropZonesSelector}`).each(function () {
|
||||
var data;
|
||||
|
||||
Reference in New Issue
Block a user