Repository navigation
fix(server): preview type sends key events to the page #41432
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
+149
−15
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
e9f8293
test(server): preview type sends key events to keydown-driven fields
juliusmarminge f5d93f6
fix(server): preview type sends key events to the page
juliusmarminge 01cf2d6
fix(server): typing stops at the request deadline
juliusmarminge 9e2f760
fix(server): colour and range inputs keep their value when typed with…
juliusmarminge e6f4380
fix(server): typing with clear times out when the page stops answering
juliusmarminge File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Check the deadline before each key, not only before each 64-character piece.
typeKeyschecks the deadline only before it starts a piece of up to 64 characters. Playwright'sKeyboard.typethen sends every character in that piece without a deadline check, and the call takes no timeout. If keydown handlers are slow, a piece that starts just before the deadline runs for up to 64 times the per-key handler time. At 200 ms per key, that is up to 12.8 seconds past the budget.SessionControlholds later queued actions until the running action settles, so those actions also wait for the overrun.Typical pages handle a key in about a millisecond, so the overrun is small there. The impact is limited to pages with slow keydown handlers.
Check the deadline before each key. Typing then stops within one key of the deadline. Do not race the current promise against a timer, because the keyboard work would keep running.
Suggested fix