Repository navigation
Conversation
A dialog's root class evidence (a body scroll lock) was dropped when the runtime released the lock a few frames after hiding the panel, since restoration was read once; and was measured as empty when a surface an earlier probe opened late (a sign-in modal after a non-navigating route click) already held the lock. Await restoration, bounded, and dismiss a leaked root state before each trigger is opened. Refs #1261
…ach trigger A runtime can lock page scrolling before the surface an earlier probe activated mounts, when Escape has nothing to close; and the lock can land while the trigger's scroll reveals settle. Dismiss inside the trigger's baseline, right before its closed roots are read, and repeat while the leak blocks scrolling, bounded by the content mount budget. A leak that blocks nothing is page state, adopted as the resting roots. Refs #1261
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.
Part of #1261: identical header chrome should capture the same way on every route.
Problem
A dialog's root-class evidence (for example a body scroll lock, exported as
data-blocks-engine-capture-dialog-ancestor-state) was dropped, or measured as empty, depending on timing. On the #1261 site the cart drawer lost it on some routes, while the menu on the same routes kept it. Playwright traces showed two separate races:rootsRestoredwas false, and the state was discarded.Fix
rootClassesRestored()waits, bounded byDIALOG_WAIT_MS, for the recorded delta to be reverted. It is used for both triggered dialogs and controlled disclosures.Tests
New
interaction-capture.test.tscases cover both races: a lock released 400 ms after close, and a late-loading modal opened by an earlier button. Both fail onmainand pass here.npx tsc -p tsconfig.build.jsonis clean. The full suite result compared withmainis posted below.Filed by Franklin (Claude via Pi, Roadie).