[Webkit-unassigned] [Bug 254926] REGRESSION (iOS 16.4): Cordova APP Webview CSS position:fixed not work correctly

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sun May 21 16:40:40 PDT 2023


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

Kris Sebesta <krissebesta at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |krissebesta at gmail.com

--- Comment #7 from Kris Sebesta <krissebesta at gmail.com> ---
A WORKAROUND: We ran into this issue as well. Since upgrading to WKWebView broke our ajax calls (XHR would not populate, a known limitation!) and none of the other ajax/XHR fixes proposed by other devs actually worked, so  we went with a simple fix/hack. We added a function on the scroll event (like so... "document.addEventListener('scroll', function() {}") and we set the element.style.top = '0px;' in the function.  Then, THIS IS IMPORTANT, we created a timer (like so... "setTimeout(function() { set element.style.top = previousTopValue }, 0);") and in that function we set it back to the value it was before we set it to 0px. This triggered the browser to force the page to correctly redraw every time the user scrolled (it needs the timer in order to redraw it, otherwise it won't work). You can still see the fixed element detatch from its fixed position (and scroll down) but the fix/hack will immediately redraw the page correctly. Hope this helps!

-- 
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/20230521/ffd312f0/attachment.htm>


More information about the webkit-unassigned mailing list