diff --git a/App/Browser View/BrowserView.swift b/App/Browser View/BrowserView.swift index 4cff180..b29a203 100644 --- a/App/Browser View/BrowserView.swift +++ b/App/Browser View/BrowserView.swift @@ -81,10 +81,13 @@ class BrowserView: UIView } private func adjustOffsetForKeyboardNotification(userInfo: [AnyHashable : Any]) { - guard let keyboardEndFrame = userInfo[UIWindow.keyboardFrameEndUserInfoKey] as? CGRect else { return } + guard var keyboardEndFrame = userInfo[UIWindow.keyboardFrameEndUserInfoKey] as? CGRect else { return } guard let animationDuration = userInfo[UIWindow.keyboardAnimationDurationUserInfoKey] as? TimeInterval else { return } guard let animationCurve = userInfo[UIWindow.keyboardAnimationCurveUserInfoKey] as? Int else { return } + // Convert keyboard frame to screen coordinate space + keyboardEndFrame = self.convert(keyboardEndFrame, from: UIScreen.main.coordinateSpace) + let animationOptions: UIView.AnimationOptions = { curve -> UIView.AnimationOptions in switch UIView.AnimationCurve(rawValue: curve) { case .easeIn: return .curveEaseIn