Show a retry overlay when the checkout window is blocked - #791
Open
kyle-schellen wants to merge 13 commits into
Open
kyle-schellen wants to merge 13 commits into
kyle-schellen wants to merge 13 commits into
Conversation
kyle-schellen
force-pushed
the
ks-web-blocked-popup-session
branch
from
September 25, 2026 17:42
f94ab3c to
7f31272
Compare
Package Size
Web file breakdown
Measured from the PR base SHA and PR head SHA. The file breakdown shows uncompressed sizes within each package artifact, so individual files do not sum to the compressed artifact total. This comment reports package artifact sizes only; it is not a final app binary-size report. |
kyle-schellen
added this pull request to stack #837
September 28, 2026 13:15
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

What changes are you making?
Problem. When the browser blocks the checkout window (
window.openreturnsnull), the overlay still says "Continue your purchase in the checkout window". There is no window, the "checkout window" link does nothing, and the only way out is to close the overlay. Blocks usually happen because the host page does work (for example, creating a cart) between the buyer's click andopen(), and browsers only allow a new window shortly after a click.Change. The overlay now shows a blocked state: "Your browser blocked the checkout window." with Open checkout and Close. Open checkout calls
window.openagain from the buyer's own click, which browsers allow, so the common case recovers in one tap.start, thenclosewhen checkout endsclose(), or atargetchange)closedisplay: noneon the element or::part(overlay))Other details:
close, whether it's our Open checkout button, a store's own button in theoverlay-blockedslot, or the store's code callingopen()again.log-level="warn".blockedtelemetry is nowretryable: true, withisRetry: truewhen a retry is blocked again.overlay-blockedslot next to the existingoverlayslot, anddata-state="blocked"on the dialog switches between them.#isDialogVisible()so both states share it.<dialog>element's nativecloselisteners ignore the event if the dialog is open again. The native event fires asynchronously, and a retry closes and re-shows the dialog in the same task.Not in this PR: accessible names for the overlay (both states).
Context: https://shopify.slack.com/archives/C0B2UHWSG7M/p1789743314060319
How to test
dev web testanddev web lint. New tests cover the blocked overlay, the retry, andclosewhen the blocked overlay is closed.pnpm sample): under Flow, choose Use existing checkout source and paste a cart permalink (https://your-store.myshopify.com/cart/<variant-id>:1). In the DevTools console, runsetTimeout(() => document.querySelector('shopify-checkout').open(), 8000), then don't click or type on the page for 8 seconds (a click gives the page a fresh user activation, so the window would open). The browser blocks the window and the overlay shows the blocked state. Click Open checkout and checkout opens. Run it again and click Close to seeclosein the Events panel.window.open = () => nullin the console first (reload to undo).Before you merge
Important
platforms/web/README.md)Screen.Recording.2026-09-28.at.11.40.53.AM.mov