Issues with using WKWebView


#1

Do you have an expected date for releasing the WKWebView as the default engine on ionic??

We tried using it to improve scrolling on our app (virtual scroll) but found out it had some other major issues so we switched back to UIWebView. We were working on sort of a workaround to hide the bad performance of UIWebView but if this WKWebView news is true than there´s no use to waste our time with it…


Cordova + Ionic 2/3 sadly unusable on iOS. PLEASE tell me i am wrong
#2

May I ask, what major issues?

I use successful wkwebview since months in production


#3

Sure, maybe you can help ?

First problem was that our app uses the setting KeyboardDisplayRequiresUserAction=false, for improving user experience That was broken with WKWebView. I guess there is no solution yet because i found it reported as “KeyboardDisplayRequiresUserAction = false not working for wkwebview” in
https://issues.apache.org/jira/browse/CB-12037?jql=project%20%3D%20CB%20AND%20labels%20%3D%20wkwebview-known-issues

Next one was not really from WKWebView but still Ionic. We actually wanted to implement a long list using Virtual Scroll ( https://ionicframework.com/docs/api/components/virtual-scroll/VirtualScroll/ ) to make the scrolling smooth. So we switched to WKWebView and used Virtual Scroll and the list scrolling was flawless :sunny: … BUT it turns out virtual scroll does not work inside segments. It is also reported: https://github.com/ionic-team/ionic/issues/7734 And precisely our lists are inside segments.

So since the mayor reason for switching from UIWebView to WKWebView turned out to bring more problems than solutions we switched back to UIWebView :confused:

Any recomendations?


#4

I try to help but don’t except too much, you seems to know way more than me :wink:

About keyboard. I’ve got no idea what’s “KeyboardDisplayRequiresUserAction”. But I know that @manucorporat is working on a new plugin for the keyboard and that there is a branch on the wkwebview side which contains fixes for the keyboard, don’t know the status there

new plugin: https://github.com/ionic-team/cordova-plugin-keyboard

wkwebview: https://github.com/ionic-team/cordova-plugin-wkwebview-engine/tree/keyboard-fixes

Virtual scroll into segment: I don’t use virtual scroll yet, since I don’t have mega huge list, therefore I probably don’t face that problem. But I wanted to ask, why in case they don’t work with segment, don’t you replace the segments with your own custom code? with a couple of div, *ngIf and scss it’s possible to achieve the same thing. I know it’s a couple of days of investments but that could be a solution…just an idea


#5

I didn´t know about the keyboard plugin and branch, i´ll check that out :slight_smile:

And yes, i also though of doing an element of my own for replacing the segments but the time investment issue was the main reason not to do it (for now). I was sort of hoping the problem would be solved by the ionic team soon but I guess not. Eventually that might be the solution (switching to WKWebView and avoiding Segments).

Thanks for the reply!