From 139baee01f6bcfd8e4674f3ca22c2c71fe26aee8 Mon Sep 17 00:00:00 2001 From: Romain Derie Date: Mon, 4 Mar 2024 17:42:01 +0100 Subject: [PATCH] [FIX] web_editor: correctly check the toggle of new window link Before this commit and most likely since commit [1], the "Open in new window" option of link would not persist through editions. Steps to reproduce: - Create a link in the website builder - Set its "Open in new window" property to true - Save, and see that it works as expected - Now enter edit mode again, the toggle will be off and not on as it should be since the `target="_blank"` was correctly added. For easy of debugging and understanding, you can just grep this line ```js this.initialNewWindow = this.initialNewWindow || this.linkEl.target === '_blank'; ``` [1]: https://github.com/odoo/odoo/commit/d7245d2abf528d093226c80e40975e63d61e8997# opw-3781477 closes odoo/odoo#156739 X-original-commit: 5ea2e015a8faed502c378d4e5042f8a0cf50cbf9 Signed-off-by: David Monjoie (dmo) Signed-off-by: Romain Derie (rde) --- addons/web_editor/static/src/xml/wysiwyg.xml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/addons/web_editor/static/src/xml/wysiwyg.xml b/addons/web_editor/static/src/xml/wysiwyg.xml index 7499e0b305b..21144eea961 100644 --- a/addons/web_editor/static/src/xml/wysiwyg.xml +++ b/addons/web_editor/static/src/xml/wysiwyg.xml @@ -83,7 +83,7 @@
@@ -289,10 +289,10 @@ - + Open in new window
- +