Repository navigation
Conversation
A key sequence returned as soon as Chrome dispatched the key events, so a click issued right after could land before a setTimeout(0) the keys scheduled had fired. press, type, keyboard type, keyboard inserttext, and inserttext now wait for one animation frame and one macrotask before returning. Raw single-event dispatch (keydown, keyup) is unchanged. Adds e2e_press_waits_for_queued_macrotasks. Fixes vercel-labs#2510
Contributor
|
@sx4im is attempting to deploy a commit to the Vercel Labs Team on Vercel. A member of the Team first needs to authorize it. |
A key handler that opens a confirm or prompt dialog in an animation-frame callback wedged the new settle probe: the dialog pauses the page timers, so neither the frame callback nor the five-second fallback can fire and the evaluation hung until the 30s CDP timeout. wait_for_settle now bails out as soon as a JavaScript dialog opens on the settling session, and the whole probe is capped at 6s so a dialog that is already open when the settle starts cannot wedge it either. The dialog stays open for the agent to handle with the dialog command. Adds e2e_press_returns_promptly_when_key_opens_dialog. Addresses vercel[bot] review 5837358512 on vercel-labs#2521.
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.
A key sequence returned as soon as Chrome dispatched the key events, so a click issued right after could land before a setTimeout(0) the keys scheduled had fired (MUI ClickAwayListener arming on mount, in the reporter's case).
press, type, keyboard type, keyboard inserttext, and inserttext now wait for one animation frame and one macrotask before returning. Raw single-event dispatch (keydown, keyup) is unchanged, and the settle probe is best-effort so a page with no script context cannot fail a press whose keys already went out.
Verified: cargo check on the binary target passes and cargo fmt is clean. The new e2e test e2e_press_waits_for_queued_macrotasks covers the regression, but I could not build the test binary locally (repeated out-of-memory kills), so the test run is CI's verdict.
Fixes #2510