Solution B — Pre-open Window Before async The key insight: window.open('', '_blank') is called synchronously inside the button tap handler, before any await. This keeps the call inside the browser's user-gesture context. Once the PDF is generated asynchronously, we redirect the already-open window via win.location.href = dataURL instead of opening a new one — bypassing WebView popup blocking.
TS
Test Service Report
Report ID: TSR-TEST-002  |  Generated: 2026-09-11
Visit Information
Customer
ACME Corp — Branch #42
Date of Visit
2026-09-11
Purpose
Annual Equipment Inspection
Territory Manager
Jane Smith
Address
100 Industrial Blvd, Toronto ON
Truck / VIN
TEST-1234
Equipment Status
Reactor Condition
Good
Spray Hose
Good
Gun Condition
Needs Service
Air Compressor
Good
Transfer Pump A
Good
Transfer Pump B
N/A
Generator
Good
Mixer
Good
Safety Equipment
Fire Extinguisher
Present & Valid
First Aid Kit
Stocked
Supplied Air Resp.
Present
Safety Manuals
Missing
Immediate Attention
Gun condition is below standard — schedule service within 7 days. Safety manuals must be restocked before next visit.