[FIX] web_editor: position correctly the popover in side dropdown menu

Before this commit, the popover would be displayed on top of the clicked
element if that element was a menu in a dropdown.
Indeed, there was not enough room for the popover to be shown correctly, as the
available space was the dropdown itself.

Note that if there was more than 2 menus in the dropdown, it would work
correctly as it would create enough space for the popover to be shown bellow or
above the menu.

Step to reproduce:
- Create a menu and a submenu
- Click on the menu, it opens a dropdown with the submenu inside it
- Click on the submenu, the popover position is wrong

task-2618494

closes odoo/odoo#74755

X-original-commit: b0b9fd2fd07fec96dd870467e8d9d8da7996c8ef
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
Signed-off-by: Romain Derie <rdeodoo@users.noreply.github.com>
This commit is contained in:
Romain Derie
2021-08-05 12:21:02 +00:00
parent 4f21648702
commit 6ccfdfec71
@@ -54,6 +54,7 @@ const LinkPopoverWidget = Widget.extend({
content: this.$el,
placement: 'bottom',
trigger: 'click',
boundary: 'viewport',
})
.on('show.bs.popover.link_popover', () => {
this._loadAsyncLinkPreview();