[FIX] mass_mailing: remove overflow on mass mailing container

The overflow: auto on the container in mass mailing generated a
scrollbar whenever the drag and drop of snippets because
of the drop zones.

Task-2781002

X-original-commit: 2af04ad4798e11bb2c08798dddb04ed32c42992e
Part-of: odoo/odoo#88679
This commit is contained in:
Nicolas Bayet
2022-04-13 17:55:49 +02:00
parent 503f817f0b
commit 3be6d3cb8c
2 changed files with 7 additions and 0 deletions
@@ -2428,6 +2428,9 @@ var SnippetsMenu = Widget.extend({
const prom = new Promise(resolve => dragAndDropResolve = () => resolve());
self._mutex.exec(() => prom);
const doc = self.options.wysiwyg.odooEditor.document;
$(doc.body).addClass('oe_dropzone_active');
self.options.wysiwyg.odooEditor.automaticStepUnactive();
self.$el.find('.oe_snippet_thumbnail').addClass('o_we_already_dragging');
@@ -2509,6 +2512,7 @@ var SnippetsMenu = Widget.extend({
},
stop: async function (ev, ui) {
const doc = self.options.wysiwyg.odooEditor.document;
$(doc.body).removeClass('oe_dropzone_active');
self.options.wysiwyg.odooEditor.automaticStepUnactive();
self.options.wysiwyg.odooEditor.automaticStepSkipStack();
$toInsert.removeClass('oe_snippet_body');
@@ -32,6 +32,9 @@ body.o_in_iframe {
flex: 1 1 auto;
overflow: auto;
}
&.oe_dropzone_active .note-editable {
overflow: hidden;
}
.iframe-utils-zone {
display: flex;