Skip to content
Snippets Groups Projects
  1. Apr 08, 2020
  2. Apr 07, 2020
  3. Apr 03, 2020
  4. Mar 31, 2020
  5. Mar 26, 2020
  6. Mar 18, 2020
    • Tim Yung's avatar
      Pressability: Fix Missing `onLongPress` Gestures · 1f8b6980
      Tim Yung authored
      Summary:
      The current implementation of `Pressability` has a bug related to `onLongPress`.
      
      When a user starts a press gesture, we keep track of the activation position (occurs after waiting `delayPressIn` milliseconds). If the touch moves away from that position by more than 10dp, we rule out the long press gesture. This means no matter how long you hold down the press, even if you move it back to within 10dp, we will not fire `onLongPress`.
      
      However, there is currently a bug where we never reset the cached activation position. This means that after the first press gesture, all subsequent long press gestures must start within 10dp of that first press gesture. This leads to seemingly intermittent missing long press gestures.
      
      This fixes the bug by ensuring that whenever a press gestures is terminated (either via a cancel or release), we reset the activation position.
      
      Changelog:
      [General][Fixed] - Fixed Pressability to properly fire `onLongPress`.
      
      Reviewed By: TheSavior
      
      Differential Revision: D20410075
      
      fbshipit-source-id: e4727b7a9585ce3ea39481fc13e56b6b91740c8c
      1f8b6980
  7. Mar 11, 2020
  8. Mar 07, 2020
  9. Mar 06, 2020
  10. Mar 05, 2020
  11. Feb 25, 2020
Loading