Page MenuHomePhabricator

D21419.id50965.diff
No OneTemporary

D21419.id50965.diff

diff --git a/resources/celerity/map.php b/resources/celerity/map.php
--- a/resources/celerity/map.php
+++ b/resources/celerity/map.php
@@ -9,7 +9,7 @@
'names' => array(
'conpherence.pkg.css' => '0e3cf785',
'conpherence.pkg.js' => '020aebcf',
- 'core.pkg.css' => 'da792a0f',
+ 'core.pkg.css' => '2e175364',
'core.pkg.js' => '845355f4',
'dark-console.pkg.js' => '187792c2',
'differential.pkg.css' => '5c459f92',
@@ -115,7 +115,7 @@
'rsrc/css/application/uiexample/example.css' => 'b4795059',
'rsrc/css/core/core.css' => '1b29ed61',
'rsrc/css/core/remarkup.css' => '7d3ebc86',
- 'rsrc/css/core/syntax.css' => '548567f6',
+ 'rsrc/css/core/syntax.css' => '98fdb17e',
'rsrc/css/core/z-index.css' => 'ac3bfcd4',
'rsrc/css/diviner/diviner-shared.css' => '4bd263b0',
'rsrc/css/font/font-awesome.css' => '3883938a',
@@ -909,7 +909,7 @@
'sprite-login-css' => '18b368a6',
'sprite-tokens-css' => 'f1896dc5',
'syntax-default-css' => '055fc231',
- 'syntax-highlighting-css' => '548567f6',
+ 'syntax-highlighting-css' => '98fdb17e',
'tokens-css' => 'ce5a50bd',
'trigger-rule' => '41b7b4f6',
'trigger-rule-control' => '5faf27b9',
@@ -1422,9 +1422,6 @@
'phuix-autocomplete',
'javelin-mask',
),
- '548567f6' => array(
- 'syntax-default-css',
- ),
'55a24e84' => array(
'javelin-install',
'javelin-dom',
@@ -1803,6 +1800,9 @@
'javelin-request',
'javelin-util',
),
+ '98fdb17e' => array(
+ 'syntax-default-css',
+ ),
'995f5102' => array(
'javelin-install',
'javelin-util',
diff --git a/src/applications/differential/parser/DifferentialChangesetParser.php b/src/applications/differential/parser/DifferentialChangesetParser.php
--- a/src/applications/differential/parser/DifferentialChangesetParser.php
+++ b/src/applications/differential/parser/DifferentialChangesetParser.php
@@ -1600,6 +1600,13 @@
'span',
array(
'data-copy-text' => "\t",
+
+ // See PHI1814. Mark this as a single logical tab for the purposes
+ // of text selection behavior: when the user drags their mouse over
+ // the character sequence, we'd like the whole thing to select as
+ // a single unit.
+
+ 'class' => 'logical-tab',
),
str_repeat(' ', $ii));
$tag = phutil_string_cast($tag);
diff --git a/src/applications/differential/parser/__tests__/DifferentialTabReplacementTestCase.php b/src/applications/differential/parser/__tests__/DifferentialTabReplacementTestCase.php
--- a/src/applications/differential/parser/__tests__/DifferentialTabReplacementTestCase.php
+++ b/src/applications/differential/parser/__tests__/DifferentialTabReplacementTestCase.php
@@ -4,8 +4,8 @@
extends PhabricatorTestCase {
public function testTabReplacement() {
- $tab1 = "<span data-copy-text=\"\t\"> </span>";
- $tab2 = "<span data-copy-text=\"\t\"> </span>";
+ $tab1 = "<span data-copy-text=\"\t\" class=\"logical-tab\"> </span>";
+ $tab2 = "<span data-copy-text=\"\t\" class=\"logical-tab\"> </span>";
$cat = "\xF0\x9F\x90\xB1";
diff --git a/webroot/rsrc/css/core/syntax.css b/webroot/rsrc/css/core/syntax.css
--- a/webroot/rsrc/css/core/syntax.css
+++ b/webroot/rsrc/css/core/syntax.css
@@ -39,3 +39,8 @@
color: #ffffff;
cursor: default;
}
+
+.logical-tab {
+ user-select: all;
+ -webkit-user-select: all;
+}

File Metadata

Mime Type
text/plain
Expires
Sun, Mar 23, 10:10 AM (1 d, 9 h ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7228467
Default Alt Text
D21419.id50965.diff (3 KB)

Event Timeline