<ul dir="auto">
<li>Electron version: 1.8.1</li>
<li>Operating system: Windows 7</li>
</ul>
<h3 dir="auto">Expected behavior</h3>
<p dir="auto">I create a <code class="notranslate">BrowserWindow</code> with <code class="notranslate">webPreferences.zoomFactor=0.5</code>. Everything looks small (which is expected). Now I close the application and then change <code class="notranslate">zoomFactor=1.0</code>, it should look larger. <strong>But no.</strong> I checked the <code class="notranslate">Preferences</code> file in %appdir%, there is one section <code class="notranslate">per_host_zoom_levels</code>, which I think Electron does not update the values correctly. Please check.</p>
<ul dir="auto">
<li>Electron version: 1.7.6</li>
<li>Operating system: MacOS 10.11.6</li>
</ul>
<h3 dir="auto">Expected behavior</h3>
<p dir="auto">When a custom zoomFactor is defined in the BrowserWindow initialization (say 1.5), the window is displayed in that specific zoomFactor.</p>
<p dir="auto">If you close the app, set a new zoomFactor in the code (say 1.2), and start the app again, the new zoomFactor should take in effect.</p>
<h3 dir="auto">Actual behavior</h3>
<p dir="auto">The new zoomFactor does not take into effect, and the old one is still being used by the browser window.</p>
<p dir="auto">The only way I know of to reset it is to manually do a zoom-default keyboard command in the window (Cmd+0 in OSX), then restart the app.</p>
<h3 dir="auto">How to reproduce</h3>
<ol dir="auto">
<li>Set zoomFactor to something other than the default of 1.0:</li>
</ol>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="mainWindow = new electron.BrowserWindow({
    width: 800,
    height: 600,
    useContentSize: true,
    webPreferences: {
      zoomFactor: 1.5
    }
  })"><pre class="notranslate"><code class="notranslate">mainWindow = new electron.BrowserWindow({
    width: 800,
    height: 600,
    useContentSize: true,
    webPreferences: {
      zoomFactor: 1.5
    }
  })
</code></pre></div>
<ol start="2" dir="auto">
<li>
<p dir="auto">Close the window.</p>
</li>
<li>
<p dir="auto">Set <code class="notranslate">zoomFactor: 1.2</code>.</p>
</li>
<li>
<p dir="auto">Start the app again.</p>
</li>
<li>
<p dir="auto">Notice the page is still zoomed in at 1.5. This will persist even with an app restart, and one way to get it to read the new value is to set browser zoom to 0 manually (Cmd+0 on OSX). Also, sometimes, the page will have the proper zoomFactor visually, but if you check with <code class="notranslate">require('electron').webFrame.getZoomFactor()</code> in the renderer side, you'll still get the old/wrong value.</p>
</li>
</ol>