Repository navigation
Conversation
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.
Native keyboard delivery delayed all listener microtasks until the end of the input command. A combined keyDown therefore dispatched keypress and inserted text before a keydown listener's Promise reaction could run.
Temporarily select V8's Scoped microtask policy for native keyboard delivery, using the existing Web IDL callback nesting scopes to checkpoint after each outermost listener. Keep combined keyDown dispatch synchronous; nested dispatchEvent() calls remain inside their invoking JavaScript stack. Restore the owner's previous policy when input delivery ends.
Regression tests cover combined keyDown and rawKeyDown/char, ordering between multiple listeners and before default actions, focus changes and cancellation from microtasks, and synchronous synthetic dispatch. A V8 utility test verifies callback checkpoints and policy restoration.
Playwright 1.65.0, raw CDP, and synthetic-event probes match Chrome for Testing 145.0.7632.6. The original implementation fails the native event-order comparisons.
Validation from the repository root:
cargo fmt --allcargo clippy --workspace --all-targets --all-features -- -D warningscargo nextest run --no-fail-fast— 23,490 passed, 20 skipped.Closes #3003.