summaryrefslogtreecommitdiff
path: root/addons/web_editor/static/src/js
diff options
context:
space:
mode:
Diffstat (limited to 'addons/web_editor/static/src/js')
-rw-r--r--addons/web_editor/static/src/js/editor/snippets.editor.js7
1 files changed, 7 insertions, 0 deletions
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 577132a6f27..f19764dce46 100644
--- a/addons/web_editor/static/src/js/editor/snippets.editor.js
+++ b/addons/web_editor/static/src/js/editor/snippets.editor.js
@@ -1261,6 +1261,13 @@ var SnippetsMenu = Widget.extend({
_activateInsertionZones: function ($selectorSiblings, $selectorChildren) {
var self = this;
+ // If a modal is open, the drop zones must be created only in this modal
+ const $openModal = self.getEditableArea().find('.modal:visible');
+ if ($openModal.length) {
+ $selectorSiblings = $openModal.find($selectorSiblings);
+ $selectorChildren = $openModal.find($selectorChildren);
+ }
+
// Check if the drop zone should be horizontal or vertical
function setDropZoneDirection($elem, $parent, $sibling) {
var vertical = false;