diff --git a/res/css/views/elements/_CopyableText.pcss b/res/css/views/elements/_CopyableText.pcss index e6b3b1ebf92..8e1d3f3cfd7 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 c03de9f36ce..5a61bcd2dab 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; + } }