diff --git a/src/components/ZapDialog.tsx b/src/components/ZapDialog.tsx index 89d1c4b..8eb5763 100644 --- a/src/components/ZapDialog.tsx +++ b/src/components/ZapDialog.tsx @@ -334,6 +334,21 @@ export function ZapDialog({ target, children, className }: ZapDialogProps) { } }, [open, setInvoice]); + // Force drawer to expand to full height when showing invoice on mobile + useEffect(() => { + if (isMobile && open && invoice) { + // Use requestAnimationFrame to ensure DOM is ready + requestAnimationFrame(() => { + const drawerContent = document.querySelector('[data-testid="zap-modal"]') as HTMLElement; + if (drawerContent) { + // Force the drawer to full height + drawerContent.style.height = '100%'; + drawerContent.style.maxHeight = '95vh'; + } + }); + } + }, [isMobile, open, invoice]); + const handleZap = () => { const finalAmount = typeof amount === 'string' ? parseInt(amount, 10) : amount; zap(finalAmount, comment); @@ -374,7 +389,8 @@ export function ZapDialog({ target, children, className }: ZapDialogProps) { @@ -416,7 +432,7 @@ export function ZapDialog({ target, children, className }: ZapDialogProps) { )} -
+