Skip to content

Commit

Permalink
fix content inset when keyboard is visible
Browse files Browse the repository at this point in the history
  • Loading branch information
brindy committed Aug 7, 2024
1 parent ad328f4 commit d0f604b
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions DuckDuckGo/MainViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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()
}
Expand Down

0 comments on commit d0f604b

Please sign in to comment.