[IMP] web : Open mail sender widget in a new window
This PR aims to change the target of the email widget to _blank. Indeed depending on your mail provider, it can open the mail editor in your current tab and might not be practical for the user if he needs information that was present on the previous tab to compose the mail. task-3324948 closes odoo/odoo#121277 Signed-off-by: Luca Vitali <luvi@odoo.com>
This commit is contained in:
@@ -27,6 +27,7 @@
|
||||
t-if="props.record.data[props.name]"
|
||||
t-att-href="'mailto:'+props.record.data[props.name]"
|
||||
class="ms-3 d-inline-flex align-items-center"
|
||||
target="_blank"
|
||||
>
|
||||
<i class="fa fa-envelope" data-tooltip="Send Email" aria-label="Send Email"></i>
|
||||
</a>
|
||||
|
||||
@@ -75,6 +75,12 @@ QUnit.module("Fields", (hooks) => {
|
||||
"should have rendered the email button as a link with correct classes"
|
||||
);
|
||||
assert.hasAttrValue(emailBtn, "href", "mailto:yop", "should have proper mailto prefix");
|
||||
assert.hasAttrValue(
|
||||
emailBtn,
|
||||
"target",
|
||||
"_blank",
|
||||
"should have target attribute set to _blank"
|
||||
);
|
||||
|
||||
// change value in edit mode
|
||||
await editInput(target, ".o_field_email input[type='email']", "new");
|
||||
|
||||
Reference in New Issue
Block a user