@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Switch back to zwsp for oncopy line marker

Summary:
Fixes T4759.

Turns out Chrome on windows doesn't really like the word joiner character. We'll switch back to zwsp but make it `position: absolute;` so it doesn't turn into a line break.

Test Plan: Looked at diffs in IE9 and Chrome Windows. Made sure copying still works as expected.

Reviewers: chad, #blessed_reviewers, epriestley

Reviewed By: #blessed_reviewers, epriestley

Subscribers: epriestley, Korvin

Maniphest Tasks: T4759

Differential Revision: https://secure.phabricator.com/D8727

authored by

Ben Alpert and committed by
epriestley
a7272dfb 563a1ac5

+27 -20
+11 -11
resources/celerity/map.php
··· 8 8 'names' => 9 9 array( 10 10 'core.pkg.css' => 'ab5dd633', 11 - 'core.pkg.js' => '68839013', 11 + 'core.pkg.js' => 'c5b39816', 12 12 'darkconsole.pkg.js' => 'ca8671ce', 13 - 'differential.pkg.css' => '9578e86b', 13 + 'differential.pkg.css' => '12c11318', 14 14 'differential.pkg.js' => '11a5b750', 15 15 'diffusion.pkg.css' => '3783278d', 16 16 'diffusion.pkg.js' => '5b4010f4', ··· 55 55 'rsrc/css/application/countdown/timer.css' => '86b7b0a0', 56 56 'rsrc/css/application/diff/inline-comment-summary.css' => '14a91639', 57 57 'rsrc/css/application/differential/add-comment.css' => 'c478bcaa', 58 - 'rsrc/css/application/differential/changeset-view.css' => '6a0299e9', 58 + 'rsrc/css/application/differential/changeset-view.css' => '1570a1ff', 59 59 'rsrc/css/application/differential/core.css' => '7ac3cabc', 60 60 'rsrc/css/application/differential/results-table.css' => '239924f9', 61 61 'rsrc/css/application/differential/revision-comment.css' => '48186045', ··· 463 463 'rsrc/js/core/behavior-line-linker.js' => 'bc778103', 464 464 'rsrc/js/core/behavior-more.js' => '9b9197be', 465 465 'rsrc/js/core/behavior-object-selector.js' => 'b4eef37b', 466 - 'rsrc/js/core/behavior-oncopy.js' => 'e69e4400', 466 + 'rsrc/js/core/behavior-oncopy.js' => 'c3e218fe', 467 467 'rsrc/js/core/behavior-phabricator-nav.js' => 'b5842a5e', 468 468 'rsrc/js/core/behavior-phabricator-remarkup-assist.js' => 'c021950a', 469 469 'rsrc/js/core/behavior-refresh-csrf.js' => 'c4b31646', ··· 505 505 'conpherence-notification-css' => '403cf598', 506 506 'conpherence-update-css' => '1099a660', 507 507 'conpherence-widget-pane-css' => '87b12e0c', 508 - 'differential-changeset-view-css' => '6a0299e9', 508 + 'differential-changeset-view-css' => '1570a1ff', 509 509 'differential-core-view-css' => '7ac3cabc', 510 510 'differential-inline-comment-editor' => 'f2441746', 511 511 'differential-results-table-css' => '239924f9', ··· 596 596 'javelin-behavior-phabricator-nav' => 'b5842a5e', 597 597 'javelin-behavior-phabricator-notification-example' => 'c51a6616', 598 598 'javelin-behavior-phabricator-object-selector' => 'b4eef37b', 599 - 'javelin-behavior-phabricator-oncopy' => 'e69e4400', 599 + 'javelin-behavior-phabricator-oncopy' => 'c3e218fe', 600 600 'javelin-behavior-phabricator-remarkup-assist' => 'c021950a', 601 601 'javelin-behavior-phabricator-reveal-content' => '8f24abfc', 602 602 'javelin-behavior-phabricator-search-typeahead' => 'f6b56f7a', ··· 1635 1635 2 => 'javelin-util', 1636 1636 3 => 'javelin-magical-init', 1637 1637 ), 1638 + 'c3e218fe' => 1639 + array( 1640 + 0 => 'javelin-behavior', 1641 + 1 => 'javelin-dom', 1642 + ), 1638 1643 'c4b31646' => 1639 1644 array( 1640 1645 0 => 'javelin-request', ··· 1809 1814 1 => 'javelin-dom', 1810 1815 2 => 'javelin-view-visitor', 1811 1816 3 => 'javelin-util', 1812 - ), 1813 - 'e69e4400' => 1814 - array( 1815 - 0 => 'javelin-behavior', 1816 - 1 => 'javelin-dom', 1817 1817 ), 1818 1818 'e7c21fb3' => 1819 1819 array(
+8 -6
src/applications/differential/render/DifferentialChangesetTwoUpRenderer.php
··· 284 284 $n_id = null; 285 285 } 286 286 287 - // NOTE: This is a unicode 'word joiner' (essentially a non-breaking 288 - // zero-width space), which we use as a hint when intercepting 'copy' 289 - // events to make sure sensible text ends up on the clipboard. 290 - // See the 'phabricator-oncopy' behavior. 291 - $zero_space = "\xE2\x81\xA0"; 287 + // NOTE: This is a unicode zero-width space, which we use as a hint when 288 + // intercepting 'copy' events to make sure sensible text ends up on the 289 + // clipboard. See the 'phabricator-oncopy' behavior. 290 + $zero_space = "\xE2\x80\x8B"; 292 291 293 292 // NOTE: The Javascript is sensitive to whitespace changes in this 294 293 // block! ··· 301 300 phutil_tag( 302 301 'td', 303 302 array('class' => $n_classes, 'colspan' => $n_colspan), 304 - array($zero_space, $n_text)), 303 + array( 304 + phutil_tag('span', array('class' => 'zwsp'), $zero_space), 305 + $n_text 306 + )), 305 307 $n_cov, 306 308 )); 307 309
+1 -1
src/applications/diffusion/controller/DiffusionBrowseFileController.php
··· 789 789 $anchor_text, 790 790 791 791 // NOTE: See phabricator-oncopy behavior. 792 - "\xE2\x81\xA0", 792 + "\xE2\x80\x8B", 793 793 794 794 // TODO: [HTML] Not ideal. 795 795 phutil_safe_html(str_replace("\t", ' ', $line['data'])),
+1 -1
src/view/layout/PhabricatorSourceCodeView.php
··· 62 62 } else { 63 63 $content_number = $line_number; 64 64 // NOTE: See phabricator-oncopy behavior. 65 - $content_line = hsprintf("\xE2\x81\xA0%s", $line); 65 + $content_line = hsprintf("\xE2\x80\x8B%s", $line); 66 66 } 67 67 68 68 $row_attributes = array();
+5
webroot/rsrc/css/application/differential/changeset-view.css
··· 59 59 line-height: 16px; 60 60 } 61 61 62 + .differential-diff td .zwsp { 63 + position: absolute; 64 + width: 0; 65 + } 66 + 62 67 .differential-diff th { 63 68 text-align: right; 64 69 padding: 2px 6px 0px 0px;
+1 -1
webroot/rsrc/js/core/behavior-oncopy.js
··· 16 16 */ 17 17 JX.behavior('phabricator-oncopy', function() { 18 18 19 - var zws = "\u2060"; // Unicode Word Joiner (Non-Breaking Zero-Width Space) 19 + var zws = "\u200B"; // Unicode Zero-Width Space 20 20 21 21 JX.enableDispatch(document.body, 'copy'); 22 22 JX.Stratcom.listen(