WKWebView Scroll Position
In NetNewsWire, I use JavaScript evaluation with a
WKWebView
to get the current scroll position.It broke in Catalina. I used
document.body.scrollTop
to get the y position, which appears to always return 0 now.Workaround:
window.pageYOffset
seems to work.
The workaround I found was
document.documentElement.scrollTop
. This one’s mutable wherewindow.pageYOffset
is read-only.
It’s a long road to replace the WebView
APIs that worked for so long.
Matt Netkow (via Michael Love):
Recently, Apple introduced a new App Submission warning stating that they are formally deprecating
UIWebView
. We wanted to let the Ionic community know what this warning is all about and how the Ionic team plans to address it.[…]
Sometime in the future, iOS apps may be blocked from release to the App Store when Apple decides to enforce blocking apps that use
UIWebView
.[…]
The Cordova team is actively discussing a plan to move forward. This will take time as they plan the best way to move forward without severely impacting users.
Previously:
- WebView and UIWebView Deprecated in Favor of WKWebView
- WKWebView Workarounds
- WKWebView, Sandboxing, and Searching
- WKWebView