@capgo/capacitor-inappbrowser 8.12.2-beta.pr634.543.1 → 8.12.2-beta.pr634.545.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -250,6 +250,11 @@ enum CustomWebViewFrameSupport {
|
|
|
250
250
|
}
|
|
251
251
|
|
|
252
252
|
enum ReloadGestureSupport {
|
|
253
|
+
/// Ordinary page finishes must not clear an armed pull still held by the user.
|
|
254
|
+
static func shouldApplyStopReloadGesture(reloadFromGestureInProgress: Bool) -> Bool {
|
|
255
|
+
reloadFromGestureInProgress
|
|
256
|
+
}
|
|
257
|
+
|
|
253
258
|
/// UIRefreshControl may fire valueChanged while the finger is still down.
|
|
254
259
|
/// Match browser UX: commit reload only after touch end.
|
|
255
260
|
static func shouldDeferReloadUntilTouchEnd(isTracking: Bool, isDragging: Bool) -> Bool {
|
|
@@ -117,8 +117,9 @@ extension WKWebViewController {
|
|
|
117
117
|
}
|
|
118
118
|
|
|
119
119
|
func stopReloadGesture(for navigation: WKNavigation? = nil) {
|
|
120
|
-
|
|
121
|
-
|
|
120
|
+
guard ReloadGestureSupport.shouldApplyStopReloadGesture(
|
|
121
|
+
reloadFromGestureInProgress: reloadFromGestureInProgress
|
|
122
|
+
) else { return }
|
|
122
123
|
|
|
123
124
|
// Ignore unrelated navigation callbacks while a gesture reload is in flight.
|
|
124
125
|
if let expected = reloadGestureNavigation,
|
|
@@ -3677,10 +3677,16 @@ extension WKWebViewController: WKNavigationDelegate {
|
|
|
3677
3677
|
|
|
3678
3678
|
public func webView(_ webView: WKWebView, navigationAction: WKNavigationAction, didBecome download: WKDownload) {
|
|
3679
3679
|
register(download: download, response: nil, sourceURL: navigationAction.request.url?.absoluteString)
|
|
3680
|
+
stopReloadGesture()
|
|
3680
3681
|
}
|
|
3681
3682
|
|
|
3682
3683
|
public func webView(_ webView: WKWebView, navigationResponse: WKNavigationResponse, didBecome download: WKDownload) {
|
|
3683
3684
|
register(download: download, response: navigationResponse.response)
|
|
3685
|
+
stopReloadGesture()
|
|
3686
|
+
}
|
|
3687
|
+
|
|
3688
|
+
public func webViewWebContentProcessDidTerminate(_ webView: WKWebView) {
|
|
3689
|
+
stopReloadGesture()
|
|
3684
3690
|
}
|
|
3685
3691
|
|
|
3686
3692
|
// MARK: - Dimension Management
|
package/package.json
CHANGED