Commit Graph
134 Commits
Author SHA1 Message Date
Dominic GannawayandGitHub 6b946ad9da [Flare] Add more functionality to Scroll event resonder (#16036) 2019-07-02 23:51:31 +01:00
Dominic GannawayandGitHub 6cf2234a57 [Flare] Do not block mouse presses on scroll (#16033) 2019-07-02 16:58:46 +01:00
Dominic GannawayandGitHub eb2ace1281 [Flare] Bring Flare support to React Native Fabric (#15887) 2019-06-28 01:22:32 +01:00
Dominic GannawayandGitHub 9b0bd43550 [Flare] Re-label Flare flag (#16014) 2019-06-28 01:11:11 +01:00
Dominic GannawayandGitHub 8b88ac2592 [Flare] Remove event targets including TouchHitTarget (#16011) 2019-06-27 23:58:48 +01:00
Dominic GannawayandGitHub 824e9bec7a [Flare] Fix issues with touch + pointer interactions (#15997) 2019-06-26 22:25:49 +01:00
Dominic GannawayandGitHub dd93357aa0 [Flare] Move click handling back into target phase (#15993) 2019-06-26 20:44:44 +01:00
Andrew ClarkandGitHub 4d307de458 Prefix mock Scheduler APIs with _unstable (#15999)
For now this is only meant to be consumed via `act`.
2019-06-26 12:16:08 -07:00
Brandon DailandDominic Gannaway 9b55bcfc6b [Flare] Add Hooks to event modules (#15953) 2019-06-26 08:47:21 +01:00
Dominic GannawayandGitHub 6088a201e1 [Flare] Fix Press scroll cancellation handling (#15983) 2019-06-25 14:31:48 +01:00
Dominic GannawayandGitHub fd601fb219 [Flare] Move all event responders to dom directory (#15981) 2019-06-25 09:32:20 +01:00
Dominic GannawayandGitHub 20f3546963 [Flare] Ensure Press event hook does not execute side-effects (#15976) 2019-06-24 18:31:49 +01:00
Dominic GannawayandGitHub 34ce57ae75 [Flare] Refine flow type annotations (#15950) 2019-06-21 12:32:43 +01:00
Dominic GannawayandGitHub 4f92fbce5c [Flare] Move createEvent back to React object (#15943) 2019-06-21 10:12:56 +01:00
Dominic GannawayandAndrew Clark 720db4cbe6 [Flare] Add useEvent hook implementation (#15927)
* [Flare] Add useEvent hook implementation

Validate hooks have decendent event components

Few fixes and displayName changes

Fix more responder bugs

Update error codes

* Add another test

* Address feedback
2019-06-20 19:12:40 -07:00
Nicolas GallagherandGitHub 6ff4c9de1c [Flare] Press: fix stale deactivation region state (#15931)
The responder region calculation logic wasn't updating the deactivation region
during the lifetime of an event instance, causing incorrect behaviour when the
current press ends outside the press target and if the press target has moved
since the last time the first-and-only time the deactivation region was
measured.
2019-06-20 17:10:54 -07:00
Dominic GannawayandGitHub 5368f7316c [Flare] Fix keyboard keyup regression (#15938) 2019-06-20 17:00:09 +01:00
Dominic GannawayandGitHub e61c9e0a26 [Flare] Fix Press retention state regression (#15936) 2019-06-20 13:01:56 +01:00
Dominic GannawayandGitHub b62ae16429 [Flare] Rename createEventComponent -> createEvent (#15929) 2019-06-19 21:12:14 +01:00
Nicolas GallagherandGitHub f4e1ac8caf [Flare] Press events include defaultPrevented (#15916)
* Rename `disableContextMenu` to `preventContextMenu`
* Change the behaviour of `preventContextMenu` so that `onContextMenu` is still called when the native context menu is prevented.
2019-06-19 11:00:44 -07:00
Dominic GannawayandGitHub 689beef6f5 [Flare] Move unstable_createEventComponent to ReactDOM (#15890) 2019-06-18 23:41:00 +01:00
Nicolas GallagherandGitHub f97b951666 [Flare] add disableContextMenu to Press (#15909) 2019-06-18 11:34:34 -07:00
Dominic GannawayandGitHub 353e0ee474 [Flare] remove stopLocalPropagation option + modify responder ownership (#15889) 2019-06-14 23:11:54 +01:00
Dominic GannawayandGitHub a146c1f9ed [Flare] Refactor of Press to fix various issues (#15878) 2019-06-14 22:52:26 +01:00
Dominic GannawayandGitHub 45acbdc0ba [Flare] Unsure root events are removed on contextmenu (#15862) 2019-06-12 02:19:02 +01:00
Dominic GannawayandGitHub c403ae4d35 [Flare] Move Press root event removal till click phase (#15854) 2019-06-10 19:08:53 +01:00
Dominic GannawayandGitHub f4cd7a38d2 [Flare] Listen to document.body + add stopPropagation to Press (#15853) 2019-06-10 16:51:26 +01:00
Dominic GannawayandGitHub 425473f43f [Flare] Improve runtime performance of hit target intersection (#15836) 2019-06-07 15:57:10 +01:00
Dominic GannawayandGitHub 8cfcfe0fcb [Flare] Fix ES6 issues with IE11 (#15834) 2019-06-06 18:38:46 +01:00
Dominic GannawayandGitHub 73c27d8b49 [Flare] Add basic Scroll event responder module (#15827) 2019-06-05 18:20:34 +01:00
Dominic GannawayandGitHub c72dceffbc [Flare] Small Swipe/Drag fixes (#15825) 2019-06-05 17:51:41 +01:00
Andrew ClarkandGitHub 7b28ad119e [Flare] EventPriority enum (#15823)
* Same as previous commit, but for Flare

I don't know what the public API for setting the event priority should
be. Right now it accepts a numeric enum, but is this what we want?
Maybe it should be a string enum? I've punted on this for now.

* Add test for hover events
2019-06-04 17:20:06 -07:00
Dominic GannawayandGitHub cfb79ee5b3 [Flare] Fix isTouchEvent (#15824) 2019-06-04 23:58:11 +01:00
Dominic GannawayandGitHub 8d4fb132ef [Flare] Fix nativeEvent.x/y for older browsers (#15820) 2019-06-04 20:58:20 +01:00
Dominic GannawayandGitHub 2534c0c924 [Flare] Add event position properties to Hover responder (#15819) 2019-06-04 18:10:15 +01:00
Nicolas GallagherandGitHub dd43cb5fb9 [Flare] Fix isPressWithinResponderRegion logic (#15808)
Compare the viewport-relative coordinates of getBoundingClientRect with those
of the event's client{X,Y} values. This fixes press within scrollable nodes.
2019-06-03 14:59:26 -07:00
Nicolas GallagherandGitHub 4f6cab547b [Flare] Ignore keyboard interactions on text input children (#15810) 2019-06-03 14:34:08 -07:00
Andrew Clark 5763f1d4c4 [Events] Nested discrete events across systems
If an event in the old system is dispatched synchronously within an
event from the new system, or vice versa, and the inner event is a
discrete update, React should not flush pending discrete updates before
firing the inner event's handlers, even if the outer event is not
discrete.

Another way of saying this is that nested events should never force
React to flush discrete updates.

Arguably, if the outer event is not a discrete event, then the inner
event _should_ flush the pending events. However, that would be a
breaking change. I would argue this isn't so bad, however, given that
nested events are pretty rare. They don't fit nicely into our event
model regardless, since we don't support nested React renders. In the
future we should consider warning when events are nested.
2019-05-31 17:46:30 -07:00
Nicolas GallagherandGitHub 88b3963820 [Flare] Remove deprecated keypress event (#15795)
`keypress` is a deprecated event.
2019-05-31 14:53:09 -07:00
Mateusz BurzyńskiandNicolas Gallagher 63fe08eef5 React Events: allow Tab+Alt on Mac in Focus responder (#15679)
* Fix issue with Tab+alt not being considered as isGlobalFocusVisible candidate on Mac
* Add test for Tab+alt on Mac setting pointerType: "keyboard" on a focus event
2019-05-31 14:33:42 -07:00
Nicolas GallagherandGitHub 0f7cc2ba84 React Events: check window before using navigator (#15768) 2019-05-29 20:19:31 -07:00
Nicolas GallagherandGitHub 2670bc3400 React Events: support legacy browser Spacebar key value (#15766) 2019-05-29 15:00:43 -07:00
Dominic GannawayandGitHub 142cf56cbf [Flare] Adds onContextMenu and fixes some contextmenu related issues (#15761) 2019-05-29 17:53:55 +01:00
Dominic GannawayandGitHub 287ef30bba [Flare] Deeply prevent default on anchor elements (#15750) 2019-05-28 12:46:07 +01:00
Dominic GannawayandGitHub a97b5c07b0 [Flare] More fixes for getAbsoluteBoundingClientRect (#15746) 2019-05-27 19:03:40 +01:00
Dominic GannawayandGitHub 025b07b610 [Flare] Ensure getAbsoluteBoundingClientRect aligns with offsetParent (#15720) 2019-05-23 13:51:14 +01:00
Dominic GannawayandGitHub b9ebc37c5b Fix Flow (#15710) 2019-05-22 21:04:28 +01:00
Dominic GannawayandGitHub b5dff62faf [Flare] Account for fixed elements in getAbsoluteBoundingClientRect (#15707) 2019-05-22 19:54:08 +01:00
Dominic GannawayandGitHub ef4ac42f88 [Flare] Update interactiveUpdates flushing heuristics (#15687) 2019-05-21 22:03:45 +01:00
Dominic GannawayandGitHub 121acae090 Flare: simplify dispatchEvent discrete argument (#15694) 2019-05-21 16:06:17 +01:00