title: Blank screen when opening Photo Library from WKWebView
body: <p>I use WKWebview to open a page with some <code>&lt;input type="file" /&gt;</code> in there. When selecting Photo Library and going in and out of folders, at some point the screen just shows white blank space, with just the navigation bar on top and it's reproducable. What happened?</p>
  
  <p>I test this using iOS 11.</p>
  
  <p><a href="https://i.stack.imgur.com/keWX4.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/keWX4.png" alt="enter image description here"></a></p>
  
  <p>EDIT:</p>
  
  <p>This is the initialization of WKWebView</p>
  
  <pre><code>let jscript = "var meta = document.createElement('meta'); meta.setAttribute('name', 'viewport'); meta.setAttribute('content', 'width=device-width'); document.getElementsByTagName('head')[0].appendChild(meta);"
      let userScript = WKUserScript(source: jscript, injectionTime: WKUserScriptInjectionTime.atDocumentEnd, forMainFrameOnly: true)
      let wkUController = WKUserContentController()
      wkUController.addUserScript(userScript)
      let webConfiguration = WKWebViewConfiguration()
      webConfiguration.userContentController = wkUController
  
      webView = WKWebView(frame: .zero, configuration: webConfiguration)
      webView.uiDelegate = self
  </code></pre>