-
Notifications
You must be signed in to change notification settings - Fork 47.6k
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
React events: Press event fixes #15386
Conversation
Details of bundled changes.Comparing: 9672cf6...2f6ab3e react-events
Generated by 🚫 dangerJS |
packages/react-events/src/Press.js
Outdated
if (nativeEvent.pointerType != null) { | ||
return nativeEvent.pointerType; | ||
} | ||
if (nativeEvent.type.indexOf('mouse') > -1) { |
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.
Could type
be pulled out to its own variable? Seems like a lot of property accesses each time otherwise and should reduce prod code size.
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.
Minus the nit, looks good to me! Will need rebasing with master
too :)
60439f7
to
f08ce74
Compare
f08ce74
to
2f6ab3e
Compare
pointerType
to Press events.NOTE: this currently extends
pointerType
with non-standard types. We could consider using a different name, likeinputMode
or something.NOTE: React Native doesn't have a deactivation delay for forced activation, but this is possibly because of the async bridge meaning that the events aren't dispatched sync.
Ref #15257