Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Long press doesn't work as expected on iOS #28

Closed
brentvatne opened this issue Sep 15, 2017 · 5 comments
Closed

Long press doesn't work as expected on iOS #28

brentvatne opened this issue Sep 15, 2017 · 5 comments

Comments

@brentvatne
Copy link
Contributor

Expected: once min duration is met, it should become active.
Actual iOS: only becomes active after min duration is met and touch is released
Actual Android: same as expected

@kmagiera
Copy link
Member

I think that's actually an issue with simulator only. I think that long press recognizer under the hood works in response to touch event stream that may be paused when you hold your mouse on the button in simulator. Whereas with the real devices there are always some subtle differences even if you try to hold the finger still so new events would arrive. I noticed it some time ago. You don't actually need to lift the finger, it is sufficient to hold it for a while and then slightly move and the dialog will pop up. I also tested that it works flawlessly on device. On top of that I verified that it's UILongPressGestureRecognizer not calling action handler until there is some (even unnoticeable small) movement

@kmagiera
Copy link
Member

This may be related: http://markmail.org/message/ij2y4qmax6squ5dd

@kmagiera
Copy link
Member

It also works fine if you use a touchpad instead of a mouse.

@brentvatne do you hit this problem on device or simulator?

@kmagiera
Copy link
Member

@brentvatne I wonder is the scroll + cancel event issue was maybe related to this bug report. When you have time can you check if you still encounter this after the fix has landed?

@kmagiera
Copy link
Member

Seems I finally figured out what was wrong with longpress: 86ef72a#diff-b16682bd3eb1da07c1f0a38594edb354R37

Closing this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants