From b48d568c69395480ff77f442ab3397ae7b235c2d Mon Sep 17 00:00:00 2001 From: Shivam Bajaj <52606915+sbjaj33@users.noreply.github.com> Date: Tue, 21 Feb 2023 19:33:05 +0530 Subject: [PATCH] Stop access token overflowing the box (#10069) Use a scrollable div for the access token to stop it overflowing. --- res/css/views/elements/_CopyableText.pcss | 5 ++++- res/css/views/settings/tabs/user/_HelpUserSettingsTab.pcss | 5 +++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/res/css/views/elements/_CopyableText.pcss b/res/css/views/elements/_CopyableText.pcss index e6b3b1ebf9..8e1d3f3cfd 100644 --- a/res/css/views/elements/_CopyableText.pcss +++ b/res/css/views/elements/_CopyableText.pcss @@ -38,9 +38,12 @@ limitations under the License. cursor: pointer; margin-left: 20px; display: block; + /* If the copy button is used within a scrollable div, make it stick to the right while scrolling */ + position: sticky; + right: 0; /* center to first line */ - position: relative; top: 0.15em; + background-color: $background; &::before { content: ""; diff --git a/res/css/views/settings/tabs/user/_HelpUserSettingsTab.pcss b/res/css/views/settings/tabs/user/_HelpUserSettingsTab.pcss index c03de9f36c..5a61bcd2da 100644 --- a/res/css/views/settings/tabs/user/_HelpUserSettingsTab.pcss +++ b/res/css/views/settings/tabs/user/_HelpUserSettingsTab.pcss @@ -28,4 +28,9 @@ limitations under the License. margin-bottom: $spacing-16; } } + + /* prevent the access token from overflowing the text box */ + div .mx_CopyableText { + overflow: scroll; + } }