From 52a50c5e43a78f21a1054869352db31b4fa3aba0 Mon Sep 17 00:00:00 2001
From: cadars <gregorycadars@gmail.com>
Date: Tue, 13 Dec 2022 19:43:03 +0100
Subject: [PATCH] Make handle more easily selectable on profile page (#21479)

* Make handle more easily selectable on profile page

* Wrap handle in a span

* Add `user-select: all` to span

* remove whitespace
---
 app/javascript/mastodon/features/account/components/header.js | 4 +++-
 app/javascript/styles/mastodon/components.scss                | 4 ++++
 2 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/app/javascript/mastodon/features/account/components/header.js b/app/javascript/mastodon/features/account/components/header.js
index 5eb89c0ea..f117412be 100644
--- a/app/javascript/mastodon/features/account/components/header.js
+++ b/app/javascript/mastodon/features/account/components/header.js
@@ -342,7 +342,9 @@ class Header extends ImmutablePureComponent {
           <div className='account__header__tabs__name'>
             <h1>
               <span dangerouslySetInnerHTML={displayNameHtml} /> {badge}
-              <small>@{acct} {lockedIcon}</small>
+              <small>
+                <span>@{acct}</span> {lockedIcon}
+              </small>
             </h1>
           </div>
 
diff --git a/app/javascript/styles/mastodon/components.scss b/app/javascript/styles/mastodon/components.scss
index b56d43000..1271fc7f3 100644
--- a/app/javascript/styles/mastodon/components.scss
+++ b/app/javascript/styles/mastodon/components.scss
@@ -7092,6 +7092,10 @@ noscript {
           font-weight: 400;
           overflow: hidden;
           text-overflow: ellipsis;
+
+          span {
+            user-select: all;
+          }
         }
       }
     }