Cannot change font size on WKWebView of iPad OS

I have been using this code to increase/decrease font size on WKWebView and it has been working fine.


let js = "document.getElementsByTagName('body')[0].style.webkitTextSizeAdjust='\(fontSize)%


However, it suddenly stopped working with iPadOS while it still works with iOS13.


Is this a bug of iPadOS's WKWebView?

If not, I would appreciate your advice on how to fix it.


Thanks!

Replies

Please file a bug report. This is one of the many bugs of iOS 13 (and still not fixed in 13.2.3). There's no solution available right now on the iPad.


BTW: There's no such issue on the iPhone and also no such issue when using the old "UIWebView". Only WKWebView of the iPad shows this problem.

I totally agree with the fact that there is no solution as yet from Apple. This is an important issue because many people have vision issues and need the ability to increase and decrease the global font size to view the content of an HTML document being displayed using the WKWebView class. Just like when they are using Safari on their Mac computer they can increase/decrease font size by using ⌘ - or, ⌘ +, having this ability with WKWebView woulds be very important. UIWebView, which is being deprecated, has this ability.

I hope Apple comes up with a new release that fixes this problem.