You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Tapping the Asset ID on the Asset detail screen does not copy to clipboard. Confirmed broken on arkade.money (master build).
Affected Component
src/screens/Apps/Assets/Detail.tsx — the Asset ID display element:
<Textcopy={assetInfo.assetId}color='dark50'smallercentered>{truncateId(assetInfo.assetId)}</Text><FlexRowgap='0.25rem'centered><TextSecondarycentered>Asset ID (tap to copy)</TextSecondary>...
</FlexRow>
The copy prop on Text triggers copyToClipboard() in src/lib/clipboard.ts, which uses navigator.clipboard.writeText() exclusively with no fallback:
exportconstcopyToClipboard=async(text: string): Promise<void>=>{if(navigator.clipboard){try{returnawaitnavigator.clipboard.writeText(text)}catch(err){consoleError(err,'error writing to clipboard')}}}
Root Cause
The Clipboard API (navigator.clipboard) is only available in secure contexts with user-gesture requirements. On mobile it silently fails in several common scenarios:
iOS PWA / WKWebView: navigator.clipboard is gated behind explicit user permission and may not be granted in installed PWAs
iOS Safari < 15.4: clipboard.writeText was unreliable without a visible permission prompt
Silent failure: the catch block calls consoleError but swallows the error — no toast, no feedback, user sees nothing
Additionally, the Text component defaults to overflow: hidden, text-overflow: ellipsis, white-space: nowrap — the truncated ID text is a small, hard-to-tap target on mobile with no visual affordance (no copy icon).
Steps to Reproduce
Open arkade.money on mobile (iOS or Android in-app browser)
Navigate to any asset → Asset detail screen
Tap on the truncated Asset ID or the "Asset ID (tap to copy)" label
Nothing happens — no toast, no clipboard write
Suggested Fix
1. Add execCommand fallback in src/lib/clipboard.ts
exportconstcopyToClipboard=async(text: string): Promise<void>=>{if(navigator.clipboard){try{awaitnavigator.clipboard.writeText(text)return}catch{// fall through to execCommand fallback}}// Fallback for WKWebView / older mobile browsersconstel=document.createElement('textarea')el.value=textel.style.position='fixed'el.style.opacity='0'document.body.appendChild(el)el.focus()el.select()try{document.execCommand('copy')}finally{document.body.removeChild(el)}}
2. Improve touch target and visual affordance in Detail.tsx
Add a copy icon (src/icons/Copy.tsx already exists) next to the truncated ID so users clearly understand the element is tappable. Consider wrapping the ID + icon in a row with sufficient padding for a minimum 44×44pt touch target (Apple HIG / Material guidance).
Summary
Tapping the Asset ID on the Asset detail screen does not copy to clipboard. Confirmed broken on arkade.money (master build).
Affected Component
src/screens/Apps/Assets/Detail.tsx— the Asset ID display element:The
copyprop onTexttriggerscopyToClipboard()insrc/lib/clipboard.ts, which usesnavigator.clipboard.writeText()exclusively with no fallback:Root Cause
The Clipboard API (
navigator.clipboard) is only available in secure contexts with user-gesture requirements. On mobile it silently fails in several common scenarios:navigator.clipboardis gated behind explicit user permission and may not be granted in installed PWAsnavigator.clipboardentirelyclipboard.writeTextwas unreliable without a visible permission promptcatchblock callsconsoleErrorbut swallows the error — no toast, no feedback, user sees nothingAdditionally, the
Textcomponent defaults tooverflow: hidden,text-overflow: ellipsis,white-space: nowrap— the truncated ID text is a small, hard-to-tap target on mobile with no visual affordance (no copy icon).Steps to Reproduce
Suggested Fix
1. Add execCommand fallback in
src/lib/clipboard.ts2. Improve touch target and visual affordance in
Detail.tsxAdd a copy icon (
src/icons/Copy.tsxalready exists) next to the truncated ID so users clearly understand the element is tappable. Consider wrapping the ID + icon in a row with sufficient padding for a minimum 44×44pt touch target (Apple HIG / Material guidance).Related
copyToClipboardutility)src/lib/clipboard.ts— clipboard utility used across the appsrc/icons/Copy.tsx— copy icon component already presentsrc/components/Text.tsx—copyprop handlerNotes
The fix to
clipboard.tswould benefit all copy-to-clipboard interactions across the app (addresses, txids, etc.), not just the asset ID.