From 0832e0409b83b2a633d4e840dbd0d7791fac345e Mon Sep 17 00:00:00 2001 From: Benjamin Vray Date: Fri, 23 Jun 2023 11:59:25 +0000 Subject: [PATCH] [FIX] website: fix anchor selector not closing Steps to reproduce the bug: - Drop the image-text snippet on the homepage. - Double click on the button inside the snippet. - Choose the homepage as the URL ("/"). - Open the "Page Anchor" selector and click on "#top". - Bug: the select does not close itself after selection. This bug occurred because there are two instances of Bootstrap on the same element (the link anchor dropdown): the "bs.dropdown" instance and the "bs.tooltip" instance. The tooltip instance was added by this commit [1], probably unintentionally during a copy-paste operation. Additionally, the text of the Tooltip was not correct ("Link size"). Having these two instances on the same element caused an error because, since this commit [2], we check that an element doesn't have only one instance. If multiple instances are found, the others are disabled. This check was the reason why the "bs.dropdown" instance stopped working. Note that we could have kept the Tooltip by moving it to the "we-toggler" element. However, we removed it because it didn't provide any additional value, the text of the label itself is sufficient. [1]: https://github.com/odoo/odoo/commit/740168ce8d27da3d6a7156d2d79655a898394923 [2]: https://github.com/odoo/odoo/commit/c48f57ea2538ad51e00ac27d58f8e191781444f3 task-3378864 closes odoo/odoo#126715 X-original-commit: 6367129caf2c5d4e59ba7db0fe47047be0cb6caf Signed-off-by: Quentin Smetz (qsm) --- addons/website/static/src/xml/website.editor.xml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/addons/website/static/src/xml/website.editor.xml b/addons/website/static/src/xml/website.editor.xml index ca63e9bcb6a..a8fd346cae0 100644 --- a/addons/website/static/src/xml/website.editor.xml +++ b/addons/website/static/src/xml/website.editor.xml @@ -21,8 +21,7 @@