<p dir="auto">Index.html</p>
<div class="highlight highlight-text-html-basic notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="&lt;webview id=&quot;MainPage&quot; src=&quot;https://www.google.com/&quot;&gt;&lt;/webview&gt;
&lt;script src=&quot;main.js&quot;&gt;&lt;/script&gt;"><pre class="notranslate"><span class="pl-kos">&lt;</span><span class="pl-ent">webview</span> <span class="pl-c1">id</span>="<span class="pl-s">MainPage</span>" <span class="pl-c1">src</span>="<span class="pl-s">https://www.google.com/</span>"<span class="pl-kos">&gt;</span><span class="pl-kos">&lt;/</span><span class="pl-ent">webview</span><span class="pl-kos">&gt;</span>
<span class="pl-kos">&lt;</span><span class="pl-ent">script</span> <span class="pl-c1">src</span>="<span class="pl-s">main.js</span>"<span class="pl-kos">&gt;</span><span class="pl-kos">&lt;/</span><span class="pl-ent">script</span><span class="pl-kos">&gt;</span></pre></div>
<p dir="auto">Main.js</p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="$Document.ready(function(){
  $Document.on(&quot;keydown&quot;, function(e){
    if (e.ctrlKey &amp;&amp; e.altKey &amp;&amp; e.which === 82) {
        window.location.reload();
      }
  });
});"><pre class="notranslate"><span class="pl-s1">$Document</span><span class="pl-kos">.</span><span class="pl-en">ready</span><span class="pl-kos">(</span><span class="pl-k">function</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">{</span>
  <span class="pl-s1">$Document</span><span class="pl-kos">.</span><span class="pl-en">on</span><span class="pl-kos">(</span><span class="pl-s">"keydown"</span><span class="pl-kos">,</span> <span class="pl-k">function</span><span class="pl-kos">(</span><span class="pl-s1">e</span><span class="pl-kos">)</span><span class="pl-kos">{</span>
    <span class="pl-k">if</span> <span class="pl-kos">(</span><span class="pl-s1">e</span><span class="pl-kos">.</span><span class="pl-c1">ctrlKey</span> <span class="pl-c1">&amp;&amp;</span> <span class="pl-s1">e</span><span class="pl-kos">.</span><span class="pl-c1">altKey</span> <span class="pl-c1">&amp;&amp;</span> <span class="pl-s1">e</span><span class="pl-kos">.</span><span class="pl-c1">which</span> <span class="pl-c1">===</span> <span class="pl-c1">82</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
        <span class="pl-smi">window</span><span class="pl-kos">.</span><span class="pl-c1">location</span><span class="pl-kos">.</span><span class="pl-en">reload</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
      <span class="pl-kos">}</span>
  <span class="pl-kos">}</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-kos">}</span><span class="pl-kos">)</span><span class="pl-kos">;</span></pre></div>
<p dir="auto">The web view renders perfectly on first start.<br>
But when the window is reloaded via CTRL + ALT + R<br>
The webview remains blank.</p>
<p dir="auto">I have a repeatable problem when an existing webview tag is hidden and then shown, but only in a specific situation (see instructions to repeat the problem below).  The webview does a reload even though nothing in my code told it to.  And then it shows an empty white area.  If I resize the containing DIV it is repaired and the page appears again.</p>
<p dir="auto">I'm not sure exactly what triggers this.  It happens when Atom splits a pane and then I go back to a tab with a webview.  I've walked through the split code and it just creates a new pane and then attaches a new text editor to it.</p>
<p dir="auto">To recreate the problem ...</p>
<ul dir="auto">
<li>Install the package <code class="notranslate">web-browser</code>, branch <code class="notranslate">blank-webview</code>.</li>
<li>open any text file in one pane</li>
<li>add a webpage to that pane (ctrl-alt-b)</li>
<li>select the text file and split right</li>
<li>select the original text file again</li>
<li>select web page tab</li>
</ul>
<p dir="auto">Then the webpage shows a reload indicator and comes up all white.  Resizing the page fixes it..</p>
<p dir="auto"><strong>Edit:</strong> branch is at <a href="https://github.com/mark-hahn/web-browser/tree/blank-webview">https://github.com/mark-hahn/web-browser/tree/blank-webview</a>.</p>