From 0a51bc4f05bf5704e3608a839cc199fe69e88834 Mon Sep 17 00:00:00 2001 From: epriestley Date: Wed, 10 Oct 2018 12:40:47 -0700 Subject: [PATCH] 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: ``` View Inlinefilename.txt ``` ..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 `
`?). 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 --- .../mail/DifferentialInlineCommentMailView.php | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/applications/differential/mail/DifferentialInlineCommentMailView.php b/src/applications/differential/mail/DifferentialInlineCommentMailView.php index d88effa46c..0bc914914b 100644 --- a/src/applications/differential/mail/DifferentialInlineCommentMailView.php +++ b/src/applications/differential/mail/DifferentialInlineCommentMailView.php @@ -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; }