mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-22 23:02:42 +01:00
Add a space after "View Inline" in mail to prevent double-click on the filename from selecting "Inline"
Summary: See PHI920. Ref T13210. Since the HTML is just: ``` <a>View Inline</a><span>filename.txt</span> ``` ..double-clicking "filename.txt" in email selects "Inlinefilename.txt". Add a space to stop this. At least in Safari, a space between the tags is not sufficient (perhaps because the parent is a `<div>`?). I couldn't find an authoritative-seeming source on what the rules for this actually are and adding a space here fixes the issue without changing the visual rendering, so just put it here. Test Plan: - Made an inline. - Used `bin/mail show-outbound --id ... --dump-html` to dump the HTML. - Double-clicked the filename. {F5929186} Reviewers: amckinley Reviewed By: amckinley Maniphest Tasks: T13210 Differential Revision: https://secure.phabricator.com/D19742
This commit is contained in:
parent
8bffc9ea0e
commit
0a51bc4f05
1 changed files with 12 additions and 1 deletions
|
@ -446,7 +446,18 @@ final class DifferentialInlineCommentMailView
|
||||||
'style' => implode(' ', $link_style),
|
'style' => implode(' ', $link_style),
|
||||||
'href' => $link_href,
|
'href' => $link_href,
|
||||||
),
|
),
|
||||||
pht('View Inline'));
|
array(
|
||||||
|
pht('View Inline'),
|
||||||
|
|
||||||
|
// See PHI920. Add a space after the link so we render this into
|
||||||
|
// the document:
|
||||||
|
//
|
||||||
|
// View Inline filename.txt
|
||||||
|
//
|
||||||
|
// Otherwise, we render "Inlinefilename.txt" and double-clicking
|
||||||
|
// the file name selects the word "Inline" as well.
|
||||||
|
' ',
|
||||||
|
));
|
||||||
} else {
|
} else {
|
||||||
$link = null;
|
$link = null;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue