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

bug: Tap on list item returning earlier list item when

Open peterbierman opened this issue 10 years ago • 19 comments

Type: bug

Ionic Version: 1.x

Platform: ios 9 webview

When tapping on a list item on an iOS device while scrolling it returns an earlier list item and not the one you are currently tapping.

This happens only if you set the ionicconfigprovider as follow: $ionicConfigProvider.scrolling.jsScrolling(false); If you don't set any option for the jsScrolling property (so don't include this line in your config section), it works as expected.

But according to the documentation of ionicconfigprovider this should be the default value. http://ionicframework.com/docs/api/provider/$ionicConfigProvider/ So setting the value to the default value has an other outcome then not providing the value at all.

peterbierman avatar Mar 05 '16 06:03 peterbierman

As some added information I am using ionic 1.2.4, the latest build as of now.

peterbierman avatar Mar 05 '16 06:03 peterbierman

Experiencing the same issue, on both iOS 8 and 9. we see this as a high priority issue as users are really getting confused if the app doesn't behave as intended.

SebastianSchirmer avatar Mar 24 '16 09:03 SebastianSchirmer

May I kindly ask if there is anyone looking into this? We have more and more users complaining as this is leading to unwanted results when using our app.

SebastianSchirmer avatar Apr 07 '16 12:04 SebastianSchirmer

It seems to be hard to get any response from the team. I tried the forums, slack, gitter and an official bug report. At this moment am not even looking for a fix but merely just someone looking at the bug.

One workaround you could try is giving the parent container of the scroll container a style of position=relative and set data-tap-disabled = "true" on the same parent container. Like this:

It seems to have a positive effect on our app, but your mileage may vary.

peterbierman avatar Apr 07 '16 12:04 peterbierman

Hi @leschirmeur, @persyval,

I am starting to look into this issue.

Thanks, Dan

danbucholtz avatar Apr 12 '16 15:04 danbucholtz

Hi Dan,

Thank you. If you need any clarification please let me know.

Peter

peterbierman avatar Apr 13 '16 11:04 peterbierman

Thanks @danbucholtz

SebastianSchirmer avatar Apr 13 '16 15:04 SebastianSchirmer

Hi @persyval and @leschirmeur - in the spirit of full disclosure, this isn't looking good. The scroll events in UIWebView on iOS are not functioning as one would expect. The answer is to use WKWebView, but there are challenges associated with that as well. Do you two have any ideas or thoughts of how we could get around this? I am not seeing anything immediately obvious unfortunately. I am going to close this issue - but will re-open if you wish.

The best bet is going to be to use JS Scrolling for now. You can do that by setting overflow-scroll="false" on the particular ion-content.

Thanks, Dan

danbucholtz avatar Apr 13 '16 16:04 danbucholtz

Hi Dan, Thank you for your response. Unfortunately setting overflow-scroll="false" on the view has other unwanted side effects. In my case specically this bug. And somehow I can't get wkwebview to work on iOS as well.

But the workaround I mentioned earlier about setting the 'position:relative' on the parent element fixes this enough for us to not let it be a problem.

peterbierman avatar Apr 19 '16 11:04 peterbierman

Hi @persyval That other bug you linked to is on my todos for 1.3.1. Hopefully we can get it squared away shortly.

Thanks, Dan

danbucholtz avatar Apr 19 '16 15:04 danbucholtz

@persyval I only realized now that you posted a workaround which works for you with position relative and data-tap-disabled. Will try that out. In a modal where ion-content has a parent of ion-modal-view, would you set ion-modal-view to relative and data-tap-disabled = "true" as well?

@danbucholtz You mentioned 1.3.1 - I am not sure, are you referring to Ionic 1.3.1? If yes, is there a roadmap for upcoming Ionic release versions available?

quiply avatar Apr 19 '16 19:04 quiply

Uh, it seems my last post went out from our company's account...

SebastianSchirmer avatar Apr 19 '16 19:04 SebastianSchirmer

We are planning to release Ionic 1.3 this Thursday. As far as what's next after that, I am not entirely sure. 1.3 is basically Angular 1.5 + a few bugs fixes and PRs. 1.3.1 will likely be mostly bug fixes and PRs in my opinion at this time.

danbucholtz avatar Apr 19 '16 19:04 danbucholtz

Sounds great, thx very much for your reply! And good luck for the release :-)

SebastianSchirmer avatar Apr 19 '16 20:04 SebastianSchirmer

@leschirmeur, @persyval, what sort of use cases does your app have? If you aren't using file urls, or even if you are, you could give WKWebView a shot. Telerik makes a solid cordova plugin that might help. WKWebView should solve your problem (in theory), but we can't officially make it our default until some outstanding issues are resolved by Apple.

https://github.com/Telerik-Verified-Plugins/WKWebView

There is also an Apache one but it is newer and not as well received yet. It is probably the better bet long term, though. https://github.com/apache/cordova-plugin-wkwebview-engine

danbucholtz avatar Apr 20 '16 03:04 danbucholtz

@danbucholtz we had a try at using WKWebView; i don't remember all the problems but it didn't go well. This bug is really plaguing us, we'd desperately love a solution that works with UIWebView. Do we have any hope?

michaelnatkin avatar May 06 '16 20:05 michaelnatkin

Hi @michaelnatkin,

What didn't work out with WKWebView? That + Ionic 2 is definitely the future of Ionic.

As for a fix with this, it really just comes down to what my bosses consider to be the priority or if someone wants to take a crack at a well-tested PR. So, basically, I don't know 😄 Typically we prioritize issues that a large number of users are having trouble with.

Please let me know your thoughts.

Thanks, Dan

danbucholtz avatar May 06 '16 20:05 danbucholtz

@danbucholtz if I remember right the big deal breaker for us was getting file:// urls to work. Seemed like it was going to take adding a local server to the app, ugh.

However, you are still not able to use XHR from the file:// protocol without CORS enabled on your server.

michaelnatkin avatar May 07 '16 00:05 michaelnatkin

There are some plugins that help with that, but I agree it is not ideal. We are going to keep pounding the pavement on WKWebView because it is very important to Ionic going forward. We'll keep you posted!

danbucholtz avatar May 07 '16 03:05 danbucholtz