-
Notifications
You must be signed in to change notification settings - Fork 86
[iOS 12.2 Beta & Scrolling] Scrolling Freeze Issue with iOS 12.2 Beta #984
Comments
I think this is a webkit bug, here's a minimal repro: https://gist.github.com/tlancina/694e54d8c357834f6fc0681586cdb460. Seems like scrolling breaks in 12.2 WKWebView when EDIT for clarity: the bug is that |
I'm going to add another issue that was picked up by one our testers as it may be linked . We have a feature that opens an external site in an inappbrowser and then returns back to the application. We started with the Ionic side menu starter and according to the testers the menu intermittently stops responding to the press to open it ie the menu does not slide open when we get focus back from the inappbrowser. This was working prior to iOS 12.2. |
The underlying issue that was causing the scrolling problem has been fixed by Apple as part of the iOS 12.2 Beta 6 that was released earlier this week. @Baadier-Sydow, I recommend checking your app / issue with the latest Beta to see if the issue is resolved :) |
@bryplano Thanks! We'll have a look and get back with feedback. |
I'm getting the same issue. I've updated our test iphone 8 to the latest 12.2 and have the same issue with scrolling. On our other apple devices that are on previous ios versions, the scrolling works fine. |
@dfiggtns try this fix - ionic-team/ionic-v3#984 |
@BumbleeLin unfortunately, I don't have any code that enables/disables scrolling or an app-root.ts (I have an app-component.ts, though), so I have nowhere to put that code. |
@dfiggtns that's fine. Look in node_modules>ionic-angular>es2015>components>app You should find app-root.js. Look for this method > _disableScroll |
Thank @BumbleeLin. Should I copy that file to src/components/app/app-root.ts as the fix shows or just change it in situ? |
@dfiggtns I think don't copy the entire file. Your method should look like this when done or you can copy and replace the method with the below: /**
|
@BumbleeLin, I've applied the change in situ and also copied the file the the src folder, but neither have made a difference. The scrolling is still disabled. I've found that I can re-enable scolling by manually pulling the page down, even by just one pixel. Then the scrolling works normally. I've also tried running the same code in an 11.4 simulator in xcode and the scrolling works first time. This is a very curious bug that I just can't seem to pin-point, so any other suggestions would be very gratefully received at this point. |
@dfiggtns mmmmm curious indeed, I don't think you should copy the actual file across to src folder.
|
@BumbleeLin, in-situ means where it was originally situated i.e. at node_modules>ionic-angular>es2015>components>app Copying it was just desperation to find a solution. I've just tried another search for the problem, but there doesn't seem to be many people who have had this problem yet, so I guess I'll have to keep plugging away. |
@dfiggtns that's cool :). I could try to help you offline. After applying the code to situ maybe do a rebuild of the ios project -- ionic cordova build ios |
@BumbleeLin well, I've tracked it down to a function in the cordova-plugin-ionic-webview plugin:
which is being passed a value of 'stopScroll' in the message parm. I'm not sure what's passing that value, but when I comment out self handleStopScroll as above, the scrolling starts working normally. The page has an async call to the backend api to get the data to display in an ion-list, so it may be something in ios 12.2 that detects there's not enough data at page load to warrant scrolling, so it turns it off, but there's nothing that turns it back on when the data finally arrives. I've tried using the scroll="true" option on the ion-content tag on the page, but it makes no difference. So I guess, if there's no other ionic option to force scrolling to be on, then I'll have to stick with my hack above and hope they fix it in the next ios version. |
@dfiggtns This describes my issue perfectly - I am also loading data which afterwards populates an ion-list element. |
@phpfs, I eventually ended up spending hours updating all the plugins to the latest versions (including loads of trial and error getting them to play nicely with each other), which seemed to solve the scrolling issue without having to use the scroll option or commenting out the call to the stop scroll function. Just thought you might like to know my eventual solution. |
@dfiggtns would you be able to share your ionic info and plugin list please? |
@Baadier-Sydow, a correction to my previous post. It appears I was fooled by the plugin updates and have subsequently found that my first instincts were right. My hack of commenting out the handleStopScroll line is the only way to solve the scrolling freeze issue. Let's hope someone looks into why this is happening and solves it in the next release of cordova-plugin-ionic-webview. |
@dfiggtns Easy fix that worked for me - update ionic-angular to latest nightly containing the discussed fix: |
@phpfs, ahah, that works. Thanks for spotting that. Much better than trying to go live with a hack. |
I've tried with rebuild and re-added platform but doesn't work. :| Any solution? |
@filippodicostanzo, have you tried the nightly build mentioned by @phpfs? Even though my hacks above solve the problem, so does the updated plugin and it's better to use the official solution than one of your own that'll just be overwritten the next time you update the plugin. |
Yes, i've tried all solution mentioned by @phpfs but doesn't work. I've tried also a new blank project with sidemenu and the problem is when i change the setroot(). The new page called by setRoot is freeze. But if i change the setroot with push the scroll works correctly. |
@filippodicostanzo, yes that's another quirk I found I had to do to get my app to work with ios 12.2 - change setRoot calls to use push. |
@YaroslavG , In fact I didn't find a real solution. All I did is whenever I use 'disable-scroll' class I set any css property (exp -webkit-overflow-scrolling to 'auto'), and when I remove it I reset the css property (-webkit-overflow-scrolling to 'touch') cause changing css enable the scroll again. |
@Bkhadija, can you show example code? I want to test it myself |
any news? |
@YaroslavG Here is the last thing I did and it worked |
@Bkhadija the code from last comment seems incomplete? |
do you use disable-scroll class? if yes, then just after removing that class add : |
@Bkhadija , I thought it could be solved somehow at the level of webview.. |
@Bkhadija do you mean using it inside app.component.ts? I don't. I do see that method inside node_modules/ionic-angular/es2015/components/app/app-root.js. If that's where you want me to remove it? Another thing I want to mention is, my native app is still using UIWebView, not WKWebView... |
@YaroslavG I have no idea if it have been solved or no at webview level. |
@phpfs You saved my day and I owe you. |
same issue while scrolling in ionic 4 inappbrowser how to fix it ? |
Same issue in ionic 5 react PWA. |
For me the fix was adding an extra text field and then focus() and blur() it immediately on load. |
Me too. Same issue in ionic 5 react PWA. iOS 12 |
Facing this same issue with Ionic 4 and iOS 14. adding pointer-events as auto in global resolves it but thats a patch. |
|
We are facing the same issue with Ionic 5 but only on iOS 14 @kartiksolanki where did you add the |
A workaround which worked for us was to load component data onInit with a short timeOut (not really cool but didn't find another solution so far) base on the check if the device runs on iOS 14
|
@StevieWag : I added the below code in "global.scss" and it is working.
|
In my case scrolling has been freezing if I opened an action-sheet component. The tip with the |
same here but now ionic 5 on iOS 14.2 |
I'm having the same issue. What's the better solution for now? |
|
Thanks for the answer. I'm using the JavaScript vanilla Ionic in Next.js. |
You can find the several options to run a code on load of the app, onload/deviceready event/ in the main controller |
Try this one,
|
This is a...
[x] bug report
[ ] feature request
Current behavior:
In certain situations with the iOS 12.2 Beta (since Beta 3 or earlier), it is possible for scrollable areas to become "frozen" (i.e. the user is unable to scroll).
For example, having a scrollable
ion-list
on a child page behind aLoadingController
and navigating to it from the first page of the application (see the example application further down).This scroll "freeze" persists until some other change is made to the DOM - even simply changing a CSS attribute on related scrolling elements in the Safari Webview Inspector can trigger the scrolling to work again.
This only occurs with the 12.2 Beta, so it may be related to Safari / Webkit changes.
Expected behavior:
Scrolling should work appropriately when navigating from one page to another. In the sample application, scrolling should be enabled and working after being transitioned to the "child" page and once the
LoadingController
is dismissed.Sample Repo:
Test app repo
Steps to reproduce:
Important Note: You will need a device running the iOS 12.2 Developer Beta and a Mac running Xcode 10.2 Beta to reproduce the behavior below.
Steps Listed in the Repo
npm i
ionic cordova platform add ios
ionic cordova build ios
ion-list
) does not functionOther information:
ionic info
The text was updated successfully, but these errors were encountered: