Skip to content
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 12.2 scroll hangs #326

Open
BumbleeLin opened this issue Mar 4, 2019 · 60 comments

Comments

@BumbleeLin
Copy link

commented Mar 4, 2019

Our app seems to have the scrolling hang on certain pages. In the CDVWKWebViewEngine.m file on the (void)handleStopScroll method when I change the last line from -

a) [wkWebView evaluateJavaScript:@"window.IonicStopScroll.fire()" completionHandler:nil];

To -

b) [wkWebView evaluateJavaScript:@"window.IonicStopScroll.cancel()" completionHandler:nil];

The scrolling then seems to work. I'm not sure if there is an issue with this section in the wk-plugin.js file -

 var stopScrollFunc = null;
  var stopScroll = {
    stop: function stop(callback) {
      if (!stopScrollFunc) {
        stopScrollFunc = callback;
        stopScrollHandler.postMessage('');
      }
    },
    fire: function fire() {
      stopScrollFunc && stopScrollFunc();
      stopScrollFunc = null;
    },
    cancel: function cancel() {
      stopScrollFunc = null;
    }
  };

  window.Ionic.StopScroll = stopScroll;
  // deprecated
  window.IonicStopScroll = stopScroll;
@bryplano

This comment has been minimized.

Copy link

commented Mar 4, 2019

@BumbleeLin - do you happen to have reproduction steps & a sample application that exhibits the issue?

I'm working with someone on a similar issue, but haven't yet experienced this issue myself. If you have the chance to write up a simple demo app and post that here, that'd be great!

Edit: Additionally, if you can post more information about your app environment (post the outputs of ionic info and cordova plugin ls), that'd be great.

@bryplano

This comment has been minimized.

Copy link

commented Mar 5, 2019

@Baadier-Sydow you're also welcome to post a sample application if this is an issue for you :) we're trying to look into it but have no viable reproduction steps / sample app at the moment.

@BumbleeLin

This comment has been minimized.

Copy link
Author

commented Mar 5, 2019

@bryplano awesome. I will try to help with a sample app. See below the Ionic info:

cli packages: (/usr/local/lib/node_modules)

@ionic/cli-utils  : 1.19.2
ionic (Ionic CLI) : 3.20.0

global packages:

cordova (Cordova CLI) : 8.0.0

local packages:

@ionic/app-scripts : 3.1.6
Cordova Platforms  : android 6.2.2 ios 4.5.5
Ionic Framework    : ionic-angular 3.6.0

System:

ios-deploy : 1.9.4
Node       : v8.11.4
npm        : 6.4.1
OS         : macOS
Xcode      : Xcode 9.4.1 Build version 9F2000

Environment Variables:

ANDROID_HOME : not set

Misc:

backend : pro

---------------------------->

Below is the plugin list :

com-sarriaroman-photoviewer 1.1.10 "PhotoViewer"
cordova-plugin-actionsheet 2.3.1 "ActionSheet"
cordova-plugin-camera 2.4.1 "Camera"
cordova-plugin-compat 1.1.0 "Compat"
cordova-plugin-console 1.1.0 "Console"
cordova-plugin-device 1.1.3 "Device"
cordova-plugin-fcm 2.1.2 "FCMPlugin"
cordova-plugin-geolocation 2.4.1 "Geolocation"
cordova-plugin-inappbrowser 2.0.2 "InAppBrowser"
cordova-plugin-ionic-webview 4.0.0 "cordova-plugin-ionic-webview"
cordova-plugin-network-information 1.3.3 "Network Information"
cordova-plugin-splashscreen 4.0.0 "Splashscreen"
cordova-plugin-statusbar 2.2.0 "StatusBar"
cordova-plugin-velda-devicefeedback 0.0.2 "DeviceFeedback"
cordova-plugin-whitelist 1.3.0 "Whitelist"
cordova-sqlite-storage 2.0.4 "Cordova sqlite storage plugin"
cordova.plugins.diagnostic 3.6.5 "Diagnostic"
ionic-plugin-keyboard 2.2.1 "Keyboard"
uk.co.workingedge.phonegap.plugin.launchnavigator 3.2.1 "Launch Navigator"

I will continue to dig deeper into this issue and let you know if I have any updates.

@bryplano

This comment has been minimized.

Copy link

commented Mar 5, 2019

@BumbleeLin awesome! Thank you so much :) we're working on it from our end as well, so we'll be sure to update if we find anything.

@kensodemann

This comment has been minimized.

Copy link

commented Mar 5, 2019

Here is a sample app that shows the behavior: https://github.com/kensodemann/test-scroll

Run on a phone that is running iOS 12.2 Beta 4

On home, press the button, which opens a child that will not scroll.
Make the change that @BumbleeLin specifies in the original post and rebuild
Now the scroll works when the child page is navigated to

@Baadier-Sydow

This comment has been minimized.

Copy link

commented Mar 5, 2019

@bryplano I'm on the same team as @BumbleeLin

Unfortunately the project is too large for us to create something reproducible as we arent sure on the root cause. It seems like @kensodemann may have something that can help.

@Baadier-Sydow

This comment has been minimized.

Copy link

commented Mar 5, 2019

@kensodemann @bryplano What @BumbleeLin didnt mention is that even after that change we have one or two screens that still dont work. We are going to see if we can find the root cause but arent really making any headway.

@bryplano

This comment has been minimized.

Copy link

commented Mar 5, 2019

@Baadier-Sydow no problem! Thanks for clarifying and thanks to @kensodemann for the demo app.

We're taking a look at this on our end and will post once we have any update.

@bryplano

This comment has been minimized.

Copy link

commented Mar 7, 2019

I wrote up a separate issue for the Ionic v3 repo: ionic-team/ionic-v3#984

Probably best to follow both issues as last I checked, the team is working on determining where a fix would come from. Suspicion is a Webkit / Safari issue but still working it out :)

@Baadier-Sydow

This comment has been minimized.

Copy link

commented Mar 8, 2019

I'm going to add another issue that was up by one our testers both here and on the v3 repo as it could 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.

@jcesarmobile

This comment has been minimized.

Copy link
Member

commented Mar 20, 2019

I think it has been fixed on 12.2 beta 6

@bryplano

This comment has been minimized.

Copy link

commented Mar 20, 2019

@BumbleeLin - I have closed my issue on the v3 repo because the problem no longer exists after installing iOS 12.2 Beta 6 (released earlier this week).

Reference: ionic-team/ionic-v3#984

Could you check and see if you still have issues?

@Baadier-Sydow

This comment has been minimized.

Copy link

commented Mar 20, 2019

Thanks @bryplano @BumbleeLin and I will have a look 👍

@BumbleeLin

This comment has been minimized.

Copy link
Author

commented Mar 20, 2019

@bryplano cool bro, will give you feedback on this

@BumbleeLin

This comment has been minimized.

Copy link
Author

commented Mar 26, 2019

@bryplano yo man, I'm still not having any luck with the scroll issue. Do you perhaps have any other suggestions? I have updated the device to iOS 12.2 beta 6 and used XCode 10.2 beta 4.

@bryplano

This comment has been minimized.

Copy link

commented Mar 26, 2019

@BumbleeLin - I'd recommend updating to the iOS 12.2 GA release and Xcode 10.2 GA release as well.

Do you have a simple sample application that exhibits this behavior? Beyond that, does the scroll issue occur with and without cordova-plugin-ionic-webview installed?

Apple has made some changes to Webkit as part of this 12.2 release (which we found out was causing the scrolling issue I mentioned in my previous post), so it could be there are other weird issues there too.

@BumbleeLin

This comment has been minimized.

Copy link
Author

commented Mar 26, 2019

@bryplano thanks. I'm busy with the update at the moment. I will let you know once I have done this. Thanks!

@phpfs

This comment has been minimized.

Copy link

commented Mar 27, 2019

Did you solve this issue?
I'm getting the exact same behavior as described in ionic-team/ionic-v3#984.

I tried updating/upgrading several packages with no luck so far...

@Baadier-Sydow

This comment has been minimized.

Copy link

commented Mar 27, 2019

@phpfs we still havent been able to test. @BumbleeLin and I are having issues with the latest update to Xcode. But, we'll update here as soon as we know more.

@daviddickson

This comment has been minimized.

Copy link

commented Mar 28, 2019

I'm experiencing this issue as well on the simulator and device. I'm using Ionic v3 and XCode 10.2.

@bryplano

This comment has been minimized.

Copy link

commented Mar 28, 2019

Do you have a simple sample application that exhibits this behavior? Beyond that, does the scroll issue occur with and without cordova-plugin-ionic-webview installed?

Apple has made some changes to Webkit as part of this 12.2 release (which we found out was causing the scrolling issue I mentioned in my previous post), so it could be there are other weird issues there too.

@daviddickson, have you seen if this occurs without the webview plugin installed (per my previous comment)? It would be worth trying to reproduce the problem in a simple sample application - like I said, with the Webkit changes in 12.2, I wouldn't be surprised if this is actually a Webkit bug, but it could be an issue with ionic-webview too... would like to try and determine that :)

@daviddickson

This comment has been minimized.

Copy link

commented Mar 28, 2019

@bryplano Thank you for the quick response. I appreciate it. I just created a sample app with the webview plugin installed and with the html where I'm experiencing the issue but I'm not able to reproduce it in the sample app.

@BumbleeLin

This comment has been minimized.

Copy link
Author

commented Mar 28, 2019

@daviddickson can you show your plugin list?

@daviddickson

This comment has been minimized.

Copy link

commented Mar 28, 2019

In the sample app:

    <plugin name="cordova-plugin-whitelist" spec="1.3.3" />
    <plugin name="cordova-plugin-statusbar" spec="2.4.2" />
    <plugin name="cordova-plugin-device" spec="2.0.2" />
    <plugin name="cordova-plugin-splashscreen" spec="5.0.2" />
    <plugin name="cordova-plugin-ionic-webview" spec="^3.0.0" />
    <plugin name="cordova-plugin-ionic-keyboard" spec="^2.0.5" />
@daviddickson

This comment has been minimized.

Copy link

commented Mar 28, 2019

In the app where I'm experiencing the issue:

    <plugin name="cordova-plugin-device" spec="^2.0.2" />
    <plugin name="cordova-plugin-ionic-keyboard" spec="^2.1.2" />
    <plugin name="cordova-plugin-ionic-webview" spec="^2.1.4" />
    <plugin name="cordova-plugin-splashscreen" spec="^5.0.2" />
    <plugin name="cordova-plugin-statusbar" spec="^2.4.2" />
    <plugin name="cordova-plugin-whitelist" spec="^1.3.3" />
    <plugin name="cordova-sqlite-storage" spec="2.5.2" />
    <plugin name="cordova-plugin-network-information" spec="2.0.1" />
    <plugin name="cordova-plugin-app-version" spec="0.1.9" />
@BumbleeLin

This comment has been minimized.

Copy link
Author

commented Mar 28, 2019

Maybe bump you webview plugin to sample app version?

@daviddickson

This comment has been minimized.

Copy link

commented Mar 28, 2019

I removed it using ionic cordova plugin remove and re-added. It added at version 4.0.1. Still experiencing the issue.

@BumbleeLin

This comment has been minimized.

Copy link
Author

commented Mar 28, 2019

@daviddickson kak me too. No luck with Xcode 10.2.

@daviddickson

This comment has been minimized.

Copy link

commented Mar 28, 2019

I tried installing @3 which installed 3.1.2 and tried installing specifically 3.0.0. Neither worked.

@daviddickson

This comment has been minimized.

Copy link

commented Mar 28, 2019

@BumbleeLin I can confirm the fix you put in the initial post works for me.

@daviddickson

This comment has been minimized.

Copy link

commented Mar 28, 2019

@BumbleeLin Works for me on all pages that have scrolling.

@daviddickson

This comment has been minimized.

Copy link

commented Mar 28, 2019

@phpfs How do you update to that version?

@phpfs

This comment has been minimized.

Copy link

commented Mar 28, 2019

@daviddickson Do a backup, then remove ionic-angular. Finally, npm install ionic3 via the git repo :)

@BumbleeLin

This comment has been minimized.

Copy link
Author

commented Mar 29, 2019

@bryplano yo man :) what is the purpose of the handleStopScroll method? If we remove it will the app break in any unexpected way?

@BumbleeLin

This comment has been minimized.

Copy link
Author

commented Mar 29, 2019

@phpfs is the fix a work around for now?

@BumbleeLin

This comment has been minimized.

Copy link
Author

commented Mar 29, 2019

@daviddickson this fix works - ionic-team/ionic-v3#989

@BumbleeLin BumbleeLin closed this Mar 29, 2019

@BumbleeLin BumbleeLin reopened this Mar 29, 2019

@daviddickson

This comment has been minimized.

Copy link

commented Mar 29, 2019

@phpfs

Currently the app I'm working on is at the finish line for a MVP and I'm hesitant to make environment/Ionic CLI changes because I'm not comfortable with the inner workings of what's going on here.

That being said would a step by step walkthrough of what you said look like this? -

  1. Backup - as in make a copy of the folder?
  2. npm uninstall ionic-angular (from within the project)
  3. npm install ionic-angular (at a specific version?)
  4. npm uninstall -g ionic
  5. npm install -g ionic@3
@phpfs

This comment has been minimized.

Copy link

commented Mar 29, 2019

@daviddickson
EDIT: Didn't work for me...

@phpfs

This comment has been minimized.

Copy link

commented Mar 29, 2019

@daviddickson Did you have any luck?

@daviddickson

This comment has been minimized.

Copy link

commented Mar 29, 2019

@phpfs I haven't tried. I'm going to hold off.

@wilk-polarny

This comment has been minimized.

Copy link

commented Mar 29, 2019

@daviddickson , the fix should be within ionic-angular nightly build 3.9.4-201903121725 as far as I know

@BumbleeLin

This comment has been minimized.

Copy link
Author

commented Apr 1, 2019

@daviddickson if the initial fix works for you then I think you should be safe. I also don't think that you need to update your version of Ionic to get the fix, you can manually apply the code that fixes it from the Ionic V3 repo. If you want to take the latter approach then let me know I can help you with that :)

@daviddickson

This comment has been minimized.

Copy link

commented Apr 1, 2019

@BumbleeLin I'm just going to stick with the initial fix for now. Thanks for offering to help. :)

@phpfs

This comment has been minimized.

Copy link

commented Apr 3, 2019

@simlevesque

This comment has been minimized.

Copy link

commented Apr 3, 2019

Does anyone know how to fix this if I use this plugin inside a ionic-less cordova app ? I'm open to any kind of solution.

@BumbleeLin

This comment has been minimized.

Copy link
Author

commented Apr 4, 2019

@simlevesque please see first comment in issue

@filippodicostanzo

This comment has been minimized.

Copy link

commented Apr 4, 2019

I have the same issue. Any solution or workaround for this problem?

@phpfs

This comment has been minimized.

Copy link

commented Apr 4, 2019

See my comment above: If you use ionic, follow ionic-team/ionic-v3#984 (comment) :)

@filippodicostanzo

This comment has been minimized.

Copy link

commented Apr 4, 2019

i've installed this specific version of ionic npm i ionic-angular@3.9.4-201903121725
but doesn't work

@BumbleeLin

This comment has been minimized.

Copy link
Author

commented Apr 4, 2019

After updating try to rebuild your project or platforms

@filippodicostanzo

This comment has been minimized.

Copy link

commented Apr 4, 2019

Ok i will try and I'll let you know.
Thank You!

@filippodicostanzo

This comment has been minimized.

Copy link

commented Apr 4, 2019

I've tried with rebuild and re-added platform but doesn't work. :|
If is in page there is an event the scroll it work otherwise doesnt' work.

Any solution?

@BumbleeLin

This comment has been minimized.

Copy link
Author

commented Apr 5, 2019

@filippodicostanzo Okay try below, if it doesn't work then you are more than welcomed to contact me directly :

In Xcode > Plugins/CDVWKWebViewEngine.m file on the (void)handleStopScroll method change the last line from -

a) [wkWebView evaluateJavaScript:@"window.IonicStopScroll.fire()" completionHandler:nil];

To -

b) [wkWebView evaluateJavaScript:@"window.IonicStopScroll.cancel()" completionHandler:nil];

@filippodicostanzo

This comment has been minimized.

Copy link

commented Apr 5, 2019

@BumbleeLin yes I tried this too but it doesn't work.

How to contact directly?

The testing is very fast.
Just start a new blank project of ionic v3 with sidemenu options

ionic cordova add platform ios
ionic cordova build ios

just run on a real device and if you change the page from menu the scroll of page doesnt' work.

I repeat the problem only occurs on devices with iOS 12.2

@JoeMeeks

This comment has been minimized.

Copy link

commented Apr 16, 2019

This totally solves it for me. Add this to your scss:

ion-app.platform-ios12 ion-content { pointer-events: auto; /*fix scroll lock on ios12.2*/ }
@MeterMoDev

This comment has been minimized.

Copy link

commented May 30, 2019

This totally solves it for me. Add this to your scss:

ion-app.platform-ios12 ion-content { pointer-events: auto; /*fix scroll lock on ios12.2*/ }

Confirmed as working for me! Really appreciate it.

@emanzuetaj

This comment has been minimized.

Copy link

commented May 31, 2019

This totally solves it for me. Add this to your scss:

ion-app.platform-ios12 ion-content { pointer-events: auto; /*fix scroll lock on ios12.2*/ }

This works great, but I'm having the same issue on action sheets and adding the same css to .action-sheet-group doesn't help

@ashgibson

This comment has been minimized.

Copy link

commented Jun 28, 2019

FYI I had an issue on Ionic3 with webview and i removed these dependencies and the issue was fixed:

"@ionic-native/ionic-webview": "^5.0.0",
"cordova-plugin-ionic-webview": "^4.0.0",
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
You can’t perform that action at this time.