cordova-plugin-ionic-webview: iOS 12.2 scroll hangs

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;

About this issue

  • Original URL
  • State: open
  • Created 5 years ago
  • Reactions: 7
  • Comments: 63 (2 by maintainers)

Most upvoted comments

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*/ }

I think it has been fixed on 12.2 beta 6

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

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

@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: https://github.com/ionic-team/ionic-v3/issues/984

Could you check and see if you still have issues?

@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.

@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.

@BumbleeLin I’m just going to stick with the initial fix for now. Thanks for offering to help. 😃

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

@daviddickson EDIT: Didn’t work for me…

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

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

There seems to be a fix for said issue on the v3 repo - did this help anyone? 😃 https://github.com/ionic-team/ionic-v3/pull/989

@daviddickson awesome! Just test all pages, we have one page that doesn’t scroll with the initial post fix the rest of the pages scroll fine.

@bryplano cool bro, will give you feedback on this

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.