1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-22 14:52:41 +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:
epriestley 2018-10-10 12:40:47 -07:00
parent 8bffc9ea0e
commit 0a51bc4f05

View file

@ -446,7 +446,18 @@ final class DifferentialInlineCommentMailView
'style' => implode(' ', $link_style),
'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 {
$link = null;
}