From d0f604b704d1041d207a0705a0d4455d53436805 Mon Sep 17 00:00:00 2001 From: Chris Brind Date: Thu, 8 Aug 2024 00:06:53 +0100 Subject: [PATCH 1/2] fix content inset when keyboard is visible --- DuckDuckGo/MainViewController.swift | 2 ++ 1 file changed, 2 insertions(+) diff --git a/DuckDuckGo/MainViewController.swift b/DuckDuckGo/MainViewController.swift index 4dc2268ffe..29bf36e97e 100644 --- a/DuckDuckGo/MainViewController.swift +++ b/DuckDuckGo/MainViewController.swift @@ -613,6 +613,8 @@ class MainViewController: UIViewController { if self.appSettings.currentAddressBarPosition.isBottom { self.viewCoordinator.constraints.navigationBarContainerHeight.constant = max(52, keyboardHeight) + self.currentTab?.webView.scrollView.contentInset = .init(top: 0, left: 0, bottom: keyboardHeight > 0 ? 52 : 0, right: 0) + UIView.animate(withDuration: duration, delay: 0, options: animationCurve) { self.viewCoordinator.navigationBarContainer.superview?.layoutIfNeeded() } From 3a1289760d0218d08b137698977c180531f75d0c Mon Sep 17 00:00:00 2001 From: Chris Brind Date: Fri, 9 Aug 2024 10:48:12 +0100 Subject: [PATCH 2/2] add comment linking to asana task --- DuckDuckGo/MainViewController.swift | 2 ++ 1 file changed, 2 insertions(+) diff --git a/DuckDuckGo/MainViewController.swift b/DuckDuckGo/MainViewController.swift index 29bf36e97e..1b8d37a801 100644 --- a/DuckDuckGo/MainViewController.swift +++ b/DuckDuckGo/MainViewController.swift @@ -613,6 +613,8 @@ class MainViewController: UIViewController { if self.appSettings.currentAddressBarPosition.isBottom { self.viewCoordinator.constraints.navigationBarContainerHeight.constant = max(52, keyboardHeight) + + // Temporary fix, see https://app.asana.com/0/392891325557410/1207990702991361/f self.currentTab?.webView.scrollView.contentInset = .init(top: 0, left: 0, bottom: keyboardHeight > 0 ? 52 : 0, right: 0) UIView.animate(withDuration: duration, delay: 0, options: animationCurve) {