Skip to content

Commit

Permalink
Merge pull request #2264 from MyCryptoHQ/fixit/disallow-clicking-disa…
Browse files Browse the repository at this point in the history
…bled-wallet-button

[BUGSQUASH] Disallow clicking link on disabled WalletButton.
  • Loading branch information
ConnorBryan authored Nov 16, 2018
2 parents 14eb6d8 + 916db77 commit 6974eab
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions common/components/WalletDecrypt/components/WalletButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -119,12 +119,12 @@ export class WalletButton extends React.PureComponent<Props, State> {
<span
className="WalletButton-icons-icon"
key={i.icon}
onClick={this.stopPropogation}
onClick={this.stopPropagation}
onMouseEnter={() => this.setHoveringIcon(i.icon)}
onMouseLeave={this.clearHoveringIcon}
>
{i.href ? (
<NewTabLink href={i.href} onClick={this.stopPropogation} aria-label={i.arialabel}>
<NewTabLink href={i.href} onClick={this.stopPropagation} aria-label={i.arialabel}>
<i className={`fa fa-${i.icon}`} />
</NewTabLink>
) : (
Expand Down Expand Up @@ -154,7 +154,7 @@ export class WalletButton extends React.PureComponent<Props, State> {
this.props.onClick(this.props.walletType);
};

private stopPropogation = (ev: React.FormEvent<HTMLAnchorElement | HTMLSpanElement>) => {
private stopPropagation = (ev: React.FormEvent<HTMLAnchorElement | HTMLSpanElement>) => {
ev.stopPropagation();
};
}

0 comments on commit 6974eab

Please sign in to comment.