[Webkit-unassigned] [Bug 221658] WKWebView needs to give -scrollView access on macOS

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sat Feb 13 17:11:27 PST 2021


https://bugs.webkit.org/show_bug.cgi?id=221658

--- Comment #3 from Jonathan Deutsch <jonathan at tumult.com> ---
In Tumult Hype [https://tumult.com/hype/] scrolling is used all over the place; we will autoscroll to selected items, users will pan the view using the spacebar "hand" gesture, etc. Basically if you are a content editor you need to be in control. The workaround here was to make the WKWebView the maximum calculated size and put it in our own scroll view.

In Tumult Whisk [https://tumult.com/whisk/] have a "scroll sync" feature which keeps the scroll proportion of the editor view the same as the web view. (Clearly not all HTML will render to a proportionate correspondence, but a lot does, so it is useful for users).  The workaround here is javascript injection that receives calls from the app via evaluateJavaScript and sends scroll events via postMessage.  Due to user content changing some of the DOM getters, we have to check for stuff like the document.compatMode and window.visualViewport to manage this correctly. I attached our injection if you're interested.

If a developer's goal like mine is to make a Mac app deeply integrated with web content, they are going to want to control the its viewport. Once they start having to "stuff" their WKWebView with JavaScript workarounds for common tasks, they will question why they are making a native Mac app. I never thought this implementation would be easy, but do think it is important. Thanks!

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20210214/3bc337a7/attachment.htm>


More information about the webkit-unassigned mailing list