From 6ccfdfec715af838c924fd23ee0e67cd949b5379 Mon Sep 17 00:00:00 2001 From: Romain Derie Date: Thu, 5 Aug 2021 10:13:19 +0000 Subject: [PATCH] [FIX] web_editor: position correctly the popover in side dropdown menu MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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) Signed-off-by: Romain Derie --- .../static/src/js/wysiwyg/widgets/link_popover_widget.js | 1 + 1 file changed, 1 insertion(+) diff --git a/addons/web_editor/static/src/js/wysiwyg/widgets/link_popover_widget.js b/addons/web_editor/static/src/js/wysiwyg/widgets/link_popover_widget.js index 537209f6733..35f6fba88f0 100644 --- a/addons/web_editor/static/src/js/wysiwyg/widgets/link_popover_widget.js +++ b/addons/web_editor/static/src/js/wysiwyg/widgets/link_popover_widget.js @@ -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();