[FIX] web_editor: correctly position the blocks tooltips

Since [this commit], a tooltip is displayed on the blocks that can be
dropped in a page so that the user understands that he must not just
click on it but drag and drop the block. Unfortunately, these tooltips
were not well positioned in the email marketing application because the
editor is in an iframe in this application. This commit allows to
position correctly these tooltips.

Steps to reproduce the bug fixed by this commit:
- Go to the email marketing application
- Create a new mail
- Select a template other than "plain text".
- Triple click on a block

=> The tootlip is displayed way too high.

[this commit]: https://github.com/odoo/odoo/commit/a50c09e3b432d7601cd0e02cbbfabe24a67ba70f

task-2777738

closes odoo/odoo#111011

X-original-commit: 42d32a4f40d685e10f2ae4bb678df2009cb4bd21
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
This commit is contained in:
Guillaume (gdi)
2023-01-25 19:52:40 +01:00
parent fff73e1fb0
commit 4a9d7e5554
@@ -2823,6 +2823,10 @@ var SnippetsMenu = Widget.extend({
trigger: 'manual',
placement: 'bottom',
title: _t("Drag and drop the building block."),
// Ensure the tooltips have a good position when in iframe.
container: this.el,
// Prevent horizontal scroll when tooltip is displayed.
boundary: this.el.ownerDocument.body,
});
// Hide scroll if no snippets defined