adobe / react-spectrum

A collection of libraries and tools that help you build adaptive, accessible, and robust user experiences.
https://react-spectrum.adobe.com
Apache License 2.0
12.58k stars 1.09k forks source link

Clean up usePress code #1720

Open devongovett opened 3 years ago

devongovett commented 3 years ago
  1. We can probably get rid of the fallback events (mouse/touch) now since all supported browsers support pointer events. https://github.com/adobe/react-spectrum/discussions/5636#discussioncomment-8053511 is why we can't get rid of the fall backs
  2. Clean up the various states to simplify the code.
  3. Possibly get rid of the custom hit testing. The code comment indicates that this was for iOS < 13.2 which is long gone, so possibly this isn't needed anymore. We will need to do some testing. Related: #1061 #1613
cpatti97100 commented 7 months ago

Hi all, is this being taken into consideration?

snowystinger commented 7 months ago

Yes, however, it has some nuances that we'll need to account for, see https://github.com/adobe/react-spectrum/discussions/5636#discussioncomment-8053511

feel free to make a PR for it

nicosammito commented 7 months ago

Would be great if a fix is introduced

https://github.com/adobe/react-spectrum/issues/5290

LFDanLu commented 6 months ago

https://github.com/adobe/react-spectrum/issues/2506 is related

MrHBS commented 4 months ago

Please consider prioritizing this issue.