dillon1000/react

Commit

React events: Press event fixes (#15386)

1. Fix hiding context menu for longpress via touch.
2. Fix scrolling of viewport for longpress via spacebar key.
3. Add tests for anchor-related behaviour and preventDefault.
4. Add a deactivation delay for forced activation
5. Add pointerType to Press events.

NOTE: this currently extends pointerType to include `keyboard`.

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.
Browse files
Changed paths3 files
First-parent comparison
M packages/react-events/src/Hover.js ModifiedM packages/react-events/src/Press.js ModifiedM packages/react-events/src/__tests__/Press-test.internal.js Modified
Patch

Files changed

Rendering syntax-highlighted changes…