Skip to content

Commit

Permalink
Merge pull request #1918 from oasisprotocol/lw/fix-copy-mnemonic
Browse files Browse the repository at this point in the history
Chrome workaround to prevent copying two newlines after a mnemonic
  • Loading branch information
lukaw3d authored May 4, 2024
2 parents 04113b8 + 22bef46 commit f6a787c
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions .changelog/1918.trivial.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Chrome workaround to prevent copying two newlines after a mnemonic
Original file line number Diff line number Diff line change
Expand Up @@ -1424,6 +1424,9 @@ exports[`<CreateWalletPage /> should match snapshot 1`] = `
>
test test test test test test test test test test test test test test test test test test test test test test test test
</strong>
<span
style="user-select: none;"
/>
</span>
<div
class="c9"
Expand Down
2 changes: 2 additions & 0 deletions src/app/pages/CreateWalletPage/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,8 @@ export function CreateWalletPage(props: CreateWalletProps) {
<Box margin="xsmall" pad="small" background="background-contrast" style={{ wordSpacing: '14px' }}>
<NoTranslate>
<strong data-testid="generated-mnemonic">{mnemonic.join(' ')}</strong>
{/* Chrome workaround: Prevent copying extra newlines after user triple clicks mnemonic to copy */}
<span style={{ userSelect: 'none' }}></span>
</NoTranslate>
<Box direction="row" justify="start" margin={{ top: 'medium' }}>
<Button
Expand Down

0 comments on commit f6a787c

Please sign in to comment.