mirror of
https://github.com/maziggy/bambuddy.git
synced 2026-10-03 12:46:49 +02:00
window.open(url, '_blank', 'noopener,noreferrer') returns null even on success per the WindowFeatures spec — `noopener` deliberately suppresses the return reference. The label-print modal treated null as "popup blocked → fall back to <a download> click", so the fallback fired on every click. Result: window.open opened the blob tab (downloading a random-named PDF on systems without an inline viewer) AND the fallback downloaded bambuddy-labels.pdf — two identical PDFs per click. Drop noopener,noreferrer. The blob is same-origin, the destination is a passive PDF preview tab with no script context, and noreferrer is no-op for blob URLs. window.open now returns a real window reference on success and the if (!win) fallback only fires on genuine popup-block.