Fix virtual-keyboard-toggle focus issues#2946
Open
mgreminger wants to merge 3 commits intoarnog:masterfrom
Open
Fix virtual-keyboard-toggle focus issues#2946mgreminger wants to merge 3 commits intoarnog:masterfrom
mgreminger wants to merge 3 commits intoarnog:masterfrom
Conversation
Fixes two issues. First, if math-field is not focused, clicking keyboard-toggle will give it focus and it will accept virtual keyboard input. Second, if math-field already has focus, clicking keyboard-toggle will open virtual keyboard and math-field will accept input. Previously, both cases would require reclicking math-field element for virtual keyboard to work properly. This is what was causeing the playwright tests to fail.
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.
Fixes two issues. First, if the
math-fieldis not focused, clickingvirtual-keyboard-togglewill give it focus and it will accept virtual keyboard input. Second, ifmath-fieldalready has focus, clickingvirtual-keyboard-togglewill open the virtual keyboard and themath-fieldwill accept input from the virtual keyboard. Previously, both cases would require re-clicking themath-fieldelement for the virtual keyboard to work properly. This is what was causing two of the playwright tests to fail.I toggle the blur/focus state on the
virtual-keyboard-togglepointerdownhandler, mirroring the focus fixes for other event types. I'm not sure if this is the best way to fix this issue or not, but it's an improvement on the current behavior where, clicking thevirtual-keyboard-togglebutton either results in no focus or zombie focus where it appears to be focused but the virtual keyboard doesn't work.This pull request also fixes a timing issue with another one of the tests and bumps Playwright to the latest version