[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 `<a>` tag rather than on the styled tag. task-3773924 closes odoo/odoo#156544 X-original-commit: baf0a2f1e77b2f7aeb7f9fd657650829e5ba5e13 Signed-off-by: Antoine Guenet (age) <age@odoo.com> Signed-off-by: Deependra Solanki (deso) <deso@odoo.com>
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user