From 6f2f9ea10368ba25cfa2ccc8d403a868b3674bbb Mon Sep 17 00:00:00 2001 From: epriestley Date: Fri, 24 May 2013 10:47:54 -0700 Subject: [PATCH] Add spaces when rendering PhabricatorPropertyListView Summary: Ref T2319. In a property list view, if there's a property like: Property Name propertyvalue ...and you double click "propertyvalue" to select it so you can copy paste it (maybe it's a branch name or a URI), you get "Namepropertyvalue" (or worse). Although this "fix" is hacky, it seems to work alright and not cause side effects. Adding spaces between the tags instead (`
x
y
`) did not work in Safari. Adding a ` ` between the tags did, but that seems even messier. Test Plan: Double-clicked "propertyvalue". Reviewers: chad, btrahan Reviewed By: chad CC: aran Maniphest Tasks: T2319 Differential Revision: https://secure.phabricator.com/D6026 --- src/view/layout/PhabricatorPropertyListView.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/view/layout/PhabricatorPropertyListView.php b/src/view/layout/PhabricatorPropertyListView.php index 85805969be..c5a53bf52b 100644 --- a/src/view/layout/PhabricatorPropertyListView.php +++ b/src/view/layout/PhabricatorPropertyListView.php @@ -121,19 +121,23 @@ final class PhabricatorPropertyListView extends AphrontView { $key = $spec['key']; $value = $spec['value']; + // NOTE: We append a space to each value to improve the behavior when the + // user double-clicks a property value (like a URI) to select it. Without + // the space, the label is also selected. + $items[] = phutil_tag( 'dt', array( 'class' => 'phabricator-property-list-key', ), - $key); + array($key, ' ')); $items[] = phutil_tag( 'dd', array( 'class' => 'phabricator-property-list-value', ), - $value); + array($value, ' ')); } $list = phutil_tag(