diff --git a/src/components/AddressReact.tsx b/src/components/AddressReact.tsx index 46d3e69bace..c54e3d2e300 100644 --- a/src/components/AddressReact.tsx +++ b/src/components/AddressReact.tsx @@ -16,14 +16,22 @@ const AddressComponent = ({ contractUrl, address, endLength, urlClass, urlId }: if (!address) return null - const handleClick = (e) => { + const handleClick = (e: React.MouseEvent) => { e.preventDefault() + e.stopPropagation() if (address) navigator.clipboard.writeText(address) } return ( - + e.stopPropagation()} + > {endLength && address ? address.slice(0, endLength + 2) + "..." + address.slice(-endLength) : address} + + { + drawerWidthStore.set(DrawerWidth.Wide) + drawerContentStore.set(() => ( + + )) + }} + role="button" + tabIndex={0} + aria-label={`View ${network.name} token details`} + onKeyDown={(e) => { + if (e.key === "Enter" || e.key === " ") { + e.preventDefault() + e.currentTarget.click() + } + }} + > - + {network.tokenName} {network.tokenSymbol}