question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Gesture.Manual().shouldCancelWhenOutside(true) doesn't work on iOS or web

See original GitHub issue

Description

Using Gesture.Manual().shouldCancelWhenOutside(true) doesn’t seem to work on iOS or web. As can be seen in this demo:

ezgif-5-9f11e5bccb

UPDATE: I did some more testing to compare how Tap, LongPress, and Manual work when using shouldCancelWhenOutside(true).

On Android it works correctly for all three gestures (Tap, LongPress, and Manual): ezgif-android

On iOS it works correctly for Tap and LongPress but not Manual: ezgif-ios

On the web:

  • It doesn’t work for Tap.
  • It works for LongPress if the press starts near the center of the element, but it doesn’t work if the press starts near the edge of the element.
  • It doesn’t work for Manual. ezgif-web

Steps to reproduce

You can test out the Android and iOS versions using this Snack demo, but I haven’t figured out how to get the web version to work on Snack yet. If I try to use enableExperimentalWebImplementation(true), it says it’s not a function. Any suggestions? However, I tested the web version on my local machine as can be seen in the animated GIFs.

Snack or a link to a repository

https://snack.expo.dev/@elliotwaite/rngh-shouldcancelwhenoutside

Gesture Handler version

2.7.0

React Native version

0.69.0

Platforms

Android, iOS, Web

JavaScript runtime

No response

Workflow

No response

Architecture

No response

Build type

No response

Device

No response

Device model

No response

Acknowledgements

Yes

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
Warus15commented, Oct 17, 2022

I’m closing this issue since the PR has been merged. Feel free to re-open it if something isn’t right.

0reactions
elliotwaitecommented, Oct 17, 2022

@Warus15, sounds good.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Use AssistiveTouch on iPhone - Apple Support
AssistiveTouch helps you use iPhone if you have difficulty touching the screen ... If your gesture doesn't turn out quite right, tap Cancel,...
Read more >
Error: Unable to resolve module `react-native-gesture-handler`
Show activity on this post. This error occurs for two main reasons. If you didn't install react-native-gesture-handler , then npm or yarn ...
Read more >
Hidden iPhone Tips and Tricks to Make You an iOS Pro | PCMag
Apple's iOS is a very user-friendly mobile operating system, but there's plenty of hidden power under the hood. These expert tips will help ......
Read more >
Manual gesture | React Native Gesture Handler
cancelsTouchesInView(value) (iOS only)​. Accepts a boolean value. When true , the gesture will cancel touches for native UI components ( UIButton , UISwitch...
Read more >
Understand & manage your location when you search on ...
Your iPhone or iPad might use precise or approximate location with websites or apps. If you don't turn on precise location permissions then...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found