ionic-team / ionic-team/cordova-plugin-ionic-webview

iOS 12.2 scroll hangs

Open
#326 63 comments 7 reactions 0 assignees View on GitHub
Dominant language
Objective-C
Stars
493
Forks
410
PR merge metrics
No merged PRs in 30d

Description

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 -

```js
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;
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.