Skip to content
This repository has been archived by the owner on May 10, 2024. It is now read-only.

Commit

Permalink
Fix #2016: Don't hide the keyboard when we take a screenshot of the p…
Browse files Browse the repository at this point in the history
…age (#2057)
  • Loading branch information
kylehickinson committed Jan 2, 2020
1 parent 66af09e commit 8955025
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Client/Frontend/Browser/BrowserViewController.swift
Expand Up @@ -1505,6 +1505,11 @@ class BrowserViewController: UIViewController {
// forward/backward. Strange, but LayoutChanged fixes that.
UIAccessibility.post(notification: .layoutChanged, argument: nil)
} else if let webView = tab.webView {
// Ref #2016: Keyboard auto hides while typing
// For some reason the web view will steal first responder as soon
// as its added to the view heirarchy below. This line fixes that...
// somehow...
webView.resignFirstResponder()
// To Screenshot a tab that is hidden we must add the webView,
// then wait enough time for the webview to render.
view.insertSubview(webView, at: 0)
Expand Down

0 comments on commit 8955025

Please sign in to comment.