Only consider as touchCapable if primary pointer is touch #2167
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.
I think an improvement is that when
mathVirtualKeyboardPolicy
is 'auto', the virtual keyboard should only be shown (by default) if the user's device's primary pointer is touch, not just if touchscreen is supported.My personal use case is as follows. I have a touchscreen laptop with two modes of input, keyboard and touchscreen. In normal use, I only use the regular keyboard, and the virtual keyboard is not useful. In this case,
window.matchMedia("(pointer: coarse)").matches == false
. Although I am able to use the touchscreen when upright, in most cases I don't. Instead, when I wish to use the touchscreen, I physically fold the laptop. This causes an OS level change that disables the keyboard and also causes chrome to saywindow.matchMedia("(pointer: coarse)").matches == true
. Thus, changing this one line conveniently addresses my use case.I don't think this change would affect traditional desktops or plain touch devices; it only improves UX for devices with both touch and keyboard. This described behavior is consistent to the behavior of most other apps on my laptop: only when I enter "fold mode" does the OS virtual keyboard appear.