Commit 7b829135 authored by Zach Pomerantz's avatar Zach Pomerantz Committed by GitHub

fix: make non-interactive header elements unselectable (#2288)

parent 58313283
...@@ -66,6 +66,7 @@ const FallbackWrapper = styled(YellowCard)` ...@@ -66,6 +66,7 @@ const FallbackWrapper = styled(YellowCard)`
border-radius: 12px; border-radius: 12px;
padding: 8px 12px; padding: 8px 12px;
width: 100%; width: 100%;
user-select: none;
` `
const Icon = styled.img` const Icon = styled.img`
width: 16px; width: 16px;
......
...@@ -122,7 +122,6 @@ const AccountElement = styled.div<{ active: boolean }>` ...@@ -122,7 +122,6 @@ const AccountElement = styled.div<{ active: boolean }>`
border-radius: 12px; border-radius: 12px;
white-space: nowrap; white-space: nowrap;
width: 100%; width: 100%;
cursor: pointer;
:focus { :focus {
border: 1px solid blue; border: 1px solid blue;
...@@ -315,9 +314,9 @@ export default function Header() { ...@@ -315,9 +314,9 @@ export default function Header() {
<CardNoise /> <CardNoise />
</UNIWrapper> </UNIWrapper>
)} )}
<AccountElement active={!!account} style={{ pointerEvents: 'auto' }}> <AccountElement active={!!account}>
{account && userEthBalance ? ( {account && userEthBalance ? (
<BalanceText style={{ flexShrink: 0 }} pl="0.75rem" pr="0.5rem" fontWeight={500}> <BalanceText style={{ flexShrink: 0, userSelect: 'none' }} pl="0.75rem" pr="0.5rem" fontWeight={500}>
<Trans>{userEthBalance?.toSignificant(3)} ETH</Trans> <Trans>{userEthBalance?.toSignificant(3)} ETH</Trans>
</BalanceText> </BalanceText>
) : null} ) : null}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment