From 0dfbfe9a3543a5c5dc9536a51aff0e211ca94827 Mon Sep 17 00:00:00 2001 From: Matthew Lloyd Date: Fri, 26 Apr 2019 18:02:30 -0400 Subject: [PATCH] iOS: Call setNeedsLayout() in scrollViewDidScroll() Otherwise, the web view scrolls in blank white space which doesn't get painted until the scroll gesture is finished, because the WKWebView hasn't rendered that part of the viewport to its offscreen buffer. --- ios/Classes/InAppWebView.swift | 1 + 1 file changed, 1 insertion(+) diff --git a/ios/Classes/InAppWebView.swift b/ios/Classes/InAppWebView.swift index 31b1a5bf..95aba56e 100644 --- a/ios/Classes/InAppWebView.swift +++ b/ios/Classes/InAppWebView.swift @@ -622,6 +622,7 @@ public class InAppWebView: WKWebView, UIScrollViewDelegate, WKUIDelegate, WKNavi let y = Int(scrollView.contentOffset.y / scrollView.contentScaleFactor) onScrollChanged(x: x, y: y) } + setNeedsLayout() } public func onLoadStart(url: String) {