Event API: adds pointerType to Focus events#15645
Merged
trueadm merged 2 commits intofacebook:masterfrom May 14, 2019
Merged
Conversation
Details of bundled changes.Comparing: cc24d0e...f2536bf react-events
Generated by 🚫 dangerJS |
TrySound
reviewed
May 14, 2019
necolas
reviewed
May 14, 2019
necolas
approved these changes
May 14, 2019
Contributor
|
Is this a good name for this property? Keyboard is actually not considered to be a pointer device by various HTML etc APIs. Including this one https://developer.mozilla.org/en-US/docs/Web/API/PointerEvent/pointerType |
Andarist
reviewed
May 17, 2019
| @@ -249,6 +305,7 @@ const FocusResponder = { | |||
| nativeEvent.key === 'Tab' && | |||
| !(nativeEvent.metaKey || nativeEvent.altKey || nativeEvent.ctrlKey) | |||
| ) { | |||
Contributor
There was a problem hiding this comment.
Im wondering if this is a correct condition. MacOS (and therefore Safari) wont focus i.e. radios and checkboxes on Tab alone. U need to press down Tab+Alt for that
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.
This PR is a follow up from the ideas in #15634. Specifically, rather than create a new type of event, this PR adds a new
pointerTypeproperty to all Focus responder module events. This field lets the user know what type of input device was used to trigger a focus –touch,pen,mouseandkeyboard.