From 69b2710af9c0485cefae6078249b891ef3aa712f Mon Sep 17 00:00:00 2001 From: Leon Eckardt Date: Wed, 21 Sep 2022 11:31:37 -0600 Subject: [PATCH] Prevent Line Numbers in Diffusion being copied as Tabs Summary: Marks Line Numbers in Diffusion File Preview as unselectable Test Plan: - Select multiple Lines from a File Preview in Diffusion - Copy them into a Text Editor - The Leading Tabs should no longer included Reviewers: O1 Blessed Committers, speck, Ekubischta Reviewed By: O1 Blessed Committers, speck, Ekubischta Subscribers: Ekubischta, speck, tobiaswiese, valerio.bozzolan Differential Revision: https://we.phorge.it/D25024 --- resources/celerity/map.php | 4 ++-- webroot/rsrc/css/layout/phabricator-source-code-view.css | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/resources/celerity/map.php b/resources/celerity/map.php index 819dc37463..2985c19563 100644 --- a/resources/celerity/map.php +++ b/resources/celerity/map.php @@ -121,7 +121,7 @@ return array( 'rsrc/css/fuel/fuel-handle-list.css' => '2c4cbeca', 'rsrc/css/fuel/fuel-map.css' => 'd6e31510', 'rsrc/css/fuel/fuel-menu.css' => '21f5d199', - 'rsrc/css/layout/phabricator-source-code-view.css' => '03d7ac28', + 'rsrc/css/layout/phabricator-source-code-view.css' => '6b31244f', 'rsrc/css/phui/button/phui-button-bar.css' => 'a4aa75c4', 'rsrc/css/phui/button/phui-button-simple.css' => '1ff278aa', 'rsrc/css/phui/button/phui-button.css' => 'ea704902', @@ -803,7 +803,7 @@ return array( 'phabricator-search-results-css' => '9ea70ace', 'phabricator-shaped-request' => '995f5102', 'phabricator-slowvote-css' => '1694baed', - 'phabricator-source-code-view-css' => '03d7ac28', + 'phabricator-source-code-view-css' => '6b31244f', 'phabricator-standard-page-view' => 'a374f94c', 'phabricator-textareautils' => 'f340a484', 'phabricator-title' => '43bc9360', diff --git a/webroot/rsrc/css/layout/phabricator-source-code-view.css b/webroot/rsrc/css/layout/phabricator-source-code-view.css index 9b61425d63..71e3516003 100644 --- a/webroot/rsrc/css/layout/phabricator-source-code-view.css +++ b/webroot/rsrc/css/layout/phabricator-source-code-view.css @@ -25,6 +25,8 @@ border-right: 1px solid {$paste.border}; color: {$sh-yellowtext}; white-space: nowrap; + -webkit-user-select: none; + user-select: none; } .phabricator-source-line > a::before {