ionic-team / ionic-framework

A powerful cross-platform UI toolkit for building native-quality iOS, Android, and Progressive Web Apps with HTML, CSS, and JavaScript.
https://ionicframework.com
MIT License
51.14k stars 13.5k forks source link

Taps perform double action on Android #451

Closed credli closed 10 years ago

credli commented 10 years ago

Whenever I tap on any control, the action is triggered twice (For example, for a header button, it causes the slide menu to open the immediately close).

This happens only on Android 4.1, 4.2 and 4.3.

mlynch commented 10 years ago

Is it any control, or just the side menu header button? That might be a dupe of #252

credli commented 10 years ago

Not really, it looks like all ng-click actions ares triggered twice on Android and that started happening since we migrated to ui-router. It's like what happens when you reference angular lib more than once.

This issue doesn't seem to occur on my Mac or iOS devices, only on old Android WebViews (< 4.4). Im testing it on Samsung Galaxy S4 with Android 4.2.2

adamdbradley commented 10 years ago

Hopefully this is solved from this fix: https://github.com/driftyco/ionic/issues/432

I'm still doing some tests and will leave this open for now.

credli commented 10 years ago

I just tried pulling pre-release 0.9.21 still the same. Isn't there probably a way we can cancel the whole event trigger instead of just disabling it momentarily for 200ms?

As mentioned by in 432, it only happens with quick taps. Long ones don't cause the odd behavior.

RangerRick commented 10 years ago

I'm currently at revision 844ebc3f9ef68110359e150cc2fd295992bea5c3 (post-0.9.21) in my (beta) app and I'm getting reports from testers of this behavior as well.

FabienDehopre commented 10 years ago

I have the same issue with the revision https://github.com/driftyco/ionic/commit/203809397e73fb157820704fd6d939828a9cd2f0.

adamdbradley commented 10 years ago

Do you have ngTouch included? And if so, can you try not including ngTouch?

credli commented 10 years ago

No I don't have ngTouch included.

mlynch commented 10 years ago

I reproduced this in 4.2. Looking into a fix.

RangerRick commented 10 years ago

I don't know if this is a hint as to what's going wrong, but when I get the double-tap close in my app in 4.2, I get an artifact that appears to be coming through from a lower layer after it shuts itself again:

screen shot 2014-01-26 at 1 32 20 pm

adamdbradley commented 10 years ago

I just committed some changes to help solve this issue. Would I be able to get some other testers to verify its working?

http://forum.ionicframework.com/t/fixes-for-tap-click-events-ready-for-testing/702

Thanks

RangerRick commented 10 years ago

Confirmed working, tested with Android 2.3 and 4.2, and I saw someone on the forum post confirmed 4.1-4.3. Looks like you got it, THANKS!

ionitron-bot[bot] commented 6 years ago

Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. 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.