Skip to content

Fix virtual-keyboard-toggle focus issues#2946

Open
mgreminger wants to merge 3 commits intoarnog:masterfrom
mgreminger:fix-focus-issues
Open

Fix virtual-keyboard-toggle focus issues#2946
mgreminger wants to merge 3 commits intoarnog:masterfrom
mgreminger:fix-focus-issues

Conversation

@mgreminger
Copy link
Contributor

Fixes two issues. First, if the math-field is not focused, clicking virtual-keyboard-toggle will give it focus and it will accept virtual keyboard input. Second, if math-field already has focus, clicking virtual-keyboard-toggle will open the virtual keyboard and the math-field will accept input from the virtual keyboard. Previously, both cases would require re-clicking the math-field element 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-toggle pointerdown handler, 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 the virtual-keyboard-toggle button 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

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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant