From 8bc886447b60f408f4b4fc8df1fe67edc4e85be4 Mon Sep 17 00:00:00 2001 From: Deependra Solanki Date: Thu, 29 Feb 2024 10:30:02 +0530 Subject: [PATCH] [FIX] web_editor: ctrl+click on styled link should open the link Before this commit: Ctrl+clicking on a styled link is ineffective since the target is the styled element, which lacks an href. After this commit: The target should be set to the nearest `` tag rather than on the styled tag. task-3773924 closes odoo/odoo#156544 X-original-commit: baf0a2f1e77b2f7aeb7f9fd657650829e5ba5e13 Signed-off-by: Antoine Guenet (age) Signed-off-by: Deependra Solanki (deso) --- addons/web_editor/static/src/js/wysiwyg/wysiwyg.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/web_editor/static/src/js/wysiwyg/wysiwyg.js b/addons/web_editor/static/src/js/wysiwyg/wysiwyg.js index ae8f4e7b92d..be81be929a9 100644 --- a/addons/web_editor/static/src/js/wysiwyg/wysiwyg.js +++ b/addons/web_editor/static/src/js/wysiwyg/wysiwyg.js @@ -644,7 +644,7 @@ export class Wysiwyg extends Component { && !$target[0].closest('.o_extra_menu_items') && $target[0].isContentEditable) { if (ev.ctrlKey || ev.metaKey) { - window.open(ev.target.href, '_blank') + window.open($target[0].href, '_blank'); } this.linkPopover = $target.data('popover-widget-initialized'); if (!this.linkPopover) {