1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2025-01-10 23:01:04 +01:00

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 (`<dt>x</dt> <dd>y</dd>`) did not work in Safari. Adding a `<span> </span>` 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
This commit is contained in:
epriestley 2013-05-24 10:47:54 -07:00
parent de5eaea6ac
commit 6f2f9ea103

View file

@ -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(