-
Notifications
You must be signed in to change notification settings - Fork 13.5k
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
iOS fires both "click" and "press" events from a long press #10306
Comments
|
From the above description, it sounds like iOS is correct as click is always fired and tap and press are mutually exclusive. So we need click to fire on long presses on Android to be consistent. I found the original link here http://stackoverflow.com/questions/39628718/ionic2-tap-vs-click/39632430 |
Thanks for the issue! This issue is being closed due to inactivity. If this is still an issue with the latest version of Ionic, please create a new issue and ensure the template is fully filled out. Thank you for using Ionic! |
Ionic version: (check one with "x")
[ ] 1.x
[x] 2.x
I'm submitting a ... (check one with "x")
[x] bug report
[ ] feature request
[ ] support request => Please do not submit support requests here, use one of these channels: https://forum.ionicframework.com/ or http://ionicworldwide.herokuapp.com/
Current behavior:
When an element has both a "click" and "press" event listener, it seems like both events are fired from a long press on iOS. On Android, it seems the click event is fired from a short click and the press event is fired from a long press. This latter functionality seems correct to me.
Interestingly enough, on a short click, iOS does not fire the "press" event. Only on a long press does iOS fire both events.
Expected behavior:
iOS should function as Android does. iOS should not fire both a "click" and a "press" event from a long press.
Steps to reproduce:
This is example code but running it on the web functions correctly. I only see this issue on an iOS device or emulator. In the below example, open the console and try clicking or long pressing on the "address".
http://plnkr.co/edit/wQvVzysxsojTpWkAiJeO?p=preview
Related code:
Ionic info: (run
ionic info
from a terminal/cmd prompt and paste output below):The text was updated successfully, but these errors were encountered: