ionic-framework icon indicating copy to clipboard operation
ionic-framework copied to clipboard

Ionic 1.2 + iOS ghost click

Open kinkaz opened this issue 10 years ago • 7 comments

This one is a try to re-open this issue : https://github.com/driftyco/ionic/issues/3649

As this issue is closed, I don't know if my last comment on this issue will be noticed :

"I can reproduce this issue on iOS 9 (and I had this bug on previous versions).

When I click on a link (page A), if there is an input field on the next page (page B) at the exact spot of my link (page A), the field is focused and the keyboard opens. It's as if the click is still fired even after the transition to the next page happened.

I can solve this issue by deleting this line in my app config : $ionicConfigProvider.views.transition('none');

Is there a way to fix this ?

Thanks"

I don't want to have any transition in my app, and this issue still occurs in some pages in my app. For example, on input[type="submit"]. I use the $ionicScrollDelegate to scroll back to the top of the form if there are validation errors, but as the animated scroll is done, a field is focused (I think during this scroll).

kinkaz avatar Jan 18 '16 07:01 kinkaz

@kinkaz is this a plain link or a button? Can I see the markup for your link?

mlynch avatar Feb 03 '16 22:02 mlynch

<a class="item item-icon-left" href="#{{ menu.url }}" ng-repeat="menu in submenu"> <i class="icon {{ menu.icon }}"></i> {{ menu.title }} </a>

Plain link (edit : and button).

EDIT : I also tried to change my <a> to a <button> and I have the same problem.

Thanks for your answer

kinkaz avatar Feb 04 '16 08:02 kinkaz

Also note that this problem only occurs when using native scrolling.

If I set $ionicConfigProvider.scrolling.jsScrolling(true);, everything's fine (except it's js scrolling !)

kinkaz avatar Feb 04 '16 14:02 kinkaz

Use data-tap-disabled="true" on element.

http://ionicframework.com/docs/api/page/tap/

ananda-naphade avatar Feb 22 '16 05:02 ananda-naphade

@kinkaz I have the same problem on iOS 9.2.1. When I tap on an entry in the side menu which looks like this:

<ion-item ng-repeat="item in menu.items" menu-close ui-sref="{{::item.sref}}" ui-sref-active="activated" > <h2>{{::item.title}}</h2> </ion-item>

They keyboard automatically pops up but the text area in the next view (which is at the same co-ordinates as the menu item) doesn't actually focus. If i try and tap off the text area a few times to try and get rid of the keyboard the app crashes. @ananda-naphade I tried your suggestion, it does work, but the problem then is there is a massive lag between tapping on the item an it doing anything. Presumably your fix causes a return of the 300ms problem?

I find a similar behaviour in the following scenario. I tap on an input, the keyboard pops up and the input gets focussed and scrolled up so that it remains in view now the the keyboard is open. When i tap off the input below it (at some coordinates where the input originally was), the input loses focus and is moved back down to its original location, the keyboard is closed, but then the keyboard pops up again with nothing is in focus. Again if i tap a few times anywhere off the input the app crashes. This seems like there are ghost clicks that are not being managed correctly.

mklilley avatar Feb 24 '16 13:02 mklilley

Same problem here. We tryed to replace all ng-click by on-tap. Solved the problem partially but we got new ghost-clicks at other positions in code

niagara18 avatar Mar 23 '16 15:03 niagara18

Hello all! Since we switched to js scrolling by default for IOS a while ago, and this issue is only reproducible with native scrolling i will be closing this issue for now. Thanks for using ionic!

jgw96 avatar Aug 09 '16 18:08 jgw96