<p dir="auto">This is my simple code in index.js</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="globalShortcut.register(&quot;CmdOrCtrl+q&quot;, () =&gt; {
            app.isQuiting = true;
            app.quit();
 })
"><pre class="notranslate"><code class="notranslate">globalShortcut.register("CmdOrCtrl+q", () =&gt; {
            app.isQuiting = true;
            app.quit();
 })

</code></pre></div>
<p dir="auto">This works fine. But when used via an azerty keyboard, CMD + A is triggering the actions inside this block.</p>
<h3 dir="auto">Issue Details</h3>
<ul dir="auto">
<li><strong>Electron Version:</strong>
<ul dir="auto">
<li>8</li>
</ul>
</li>
<li><strong>Operating System:</strong>
<ul dir="auto">
<li>Mac 10.15.7</li>
</ul>
</li>
</ul>
<h3 dir="auto">Expected Behavior</h3>
<p dir="auto">CMD + A should select all</p>
<h3 dir="auto">Actual Behavior</h3>
<p dir="auto">CMD + A is triggering events for CMD + Q</p>
<h3 dir="auto">Preflight Checklist</h3>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have read the <a href="https://github.com/electron/electron/blob/master/CONTRIBUTING.md">Contributing Guidelines</a> for this project.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I agree to follow the <a href="https://github.com/electron/electron/blob/master/CODE_OF_CONDUCT.md">Code of Conduct</a> that this project adheres to.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have searched the issue tracker for an issue that matches the one I want to file, without success.</li>
</ul>
<h3 dir="auto">Issue Details</h3>
<ul dir="auto">
<li><strong>Electron Version:</strong>
<ul dir="auto">
<li>9.0.0-beta.2</li>
<li>8.0.1</li>
<li>7.1.13</li>
<li>7.0.0</li>
</ul>
</li>
<li><strong>Operating System:</strong>
<ul dir="auto">
<li><code class="notranslate">Linux xps 5.5.4-arch1-1 #1 SMP PREEMPT Sat, 15 Feb 2020 00:36:29 +0000 x86_64 GNU/Linux</code> (Arch Linux current)</li>
<li>macOS 10.15.3</li>
</ul>
</li>
<li><strong>Last Known Working Electron version:</strong>
<ul dir="auto">
<li>6.1.8 -- fine, not affected</li>
</ul>
</li>
</ul>
<h3 dir="auto">Expected Behavior</h3>
<ul dir="auto">
<li>When <code class="notranslate">safeDialogs</code> option is used, I expect to see a "Prevent this app from creating additional dialogs" checkbox on all alerts after the first one, like it happened in Electron 6.1.8.</li>
<li>I expect <code class="notranslate">safeDialogs</code> option to do at least something.</li>
</ul>
<p dir="auto">Basically, how 6.x behaves.</p>
<h3 dir="auto">Actual Behavior</h3>
<ul dir="auto">
<li>That checkbox does not appear on second alert, or on any other subsequent alert (tried about 10).</li>
<li>There seems to no observable difference at all between turning that option on or off.</li>
</ul>
<h3 dir="auto">To Reproduce</h3>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="const { BrowserWindow, app } = require('electron')
app.on('ready', () =&gt; {
  const window = new BrowserWindow({
    webPreferences: {
      //partition: 'memory',
      safeDialogs: true,
    }
  })
  window.webContents.loadURL('about:blank') // also could be e.g. https://example.com/
  window.webContents.on('did-finish-load', () =&gt; {
    window.webContents.executeJavaScript(`
      document.body.innerText = window.navigator.userAgent // (not required)
      alert(0)
      setTimeout(() =&gt; { alert(1) }, 100) // timeout for UA to be shown
    `)
  })
  window.show()
})"><pre class="notranslate"><span class="pl-k">const</span> <span class="pl-kos">{</span> BrowserWindow<span class="pl-kos">,</span> app <span class="pl-kos">}</span> <span class="pl-c1">=</span> <span class="pl-en">require</span><span class="pl-kos">(</span><span class="pl-s">'electron'</span><span class="pl-kos">)</span>
<span class="pl-s1">app</span><span class="pl-kos">.</span><span class="pl-en">on</span><span class="pl-kos">(</span><span class="pl-s">'ready'</span><span class="pl-kos">,</span> <span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-c1">=&gt;</span> <span class="pl-kos">{</span>
  <span class="pl-k">const</span> <span class="pl-s1">window</span> <span class="pl-c1">=</span> <span class="pl-k">new</span> <span class="pl-v">BrowserWindow</span><span class="pl-kos">(</span><span class="pl-kos">{</span>
    <span class="pl-c1">webPreferences</span>: <span class="pl-kos">{</span>
      <span class="pl-c">//partition: 'memory',</span>
      <span class="pl-c1">safeDialogs</span>: <span class="pl-c1">true</span><span class="pl-kos">,</span>
    <span class="pl-kos">}</span>
  <span class="pl-kos">}</span><span class="pl-kos">)</span>
  <span class="pl-s1">window</span><span class="pl-kos">.</span><span class="pl-c1">webContents</span><span class="pl-kos">.</span><span class="pl-en">loadURL</span><span class="pl-kos">(</span><span class="pl-s">'about:blank'</span><span class="pl-kos">)</span> <span class="pl-c">// also could be e.g. https://example.com/</span>
  <span class="pl-s1">window</span><span class="pl-kos">.</span><span class="pl-c1">webContents</span><span class="pl-kos">.</span><span class="pl-en">on</span><span class="pl-kos">(</span><span class="pl-s">'did-finish-load'</span><span class="pl-kos">,</span> <span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-c1">=&gt;</span> <span class="pl-kos">{</span>
    <span class="pl-s1">window</span><span class="pl-kos">.</span><span class="pl-c1">webContents</span><span class="pl-kos">.</span><span class="pl-en">executeJavaScript</span><span class="pl-kos">(</span><span class="pl-s">`</span>
<span class="pl-s">      document.body.innerText = window.navigator.userAgent // (not required)</span>
<span class="pl-s">      alert(0)</span>
<span class="pl-s">      setTimeout(() =&gt; { alert(1) }, 100) // timeout for UA to be shown</span>
<span class="pl-s">    `</span><span class="pl-kos">)</span>
  <span class="pl-kos">}</span><span class="pl-kos">)</span>
  <span class="pl-s1">window</span><span class="pl-kos">.</span><span class="pl-en">show</span><span class="pl-kos">(</span><span class="pl-kos">)</span>
<span class="pl-kos">}</span><span class="pl-kos">)</span></pre></div>
<h3 dir="auto">Screenshots</h3>
<h4 dir="auto">v6.1.8 (correct behavior)</h4>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/291301/75118279-dad32380-5689-11ea-84bd-fbb93d3fefb2.png"><img src="https://user-images.githubusercontent.com/291301/75118279-dad32380-5689-11ea-84bd-fbb93d3fefb2.png" alt="Screenshot_20200223_221526" style="max-width: 100%;"></a></p>
<h4 dir="auto">v7.0.0</h4>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/291301/75118399-e410c000-568a-11ea-8b3b-e414cb0b8c6b.png"><img src="https://user-images.githubusercontent.com/291301/75118399-e410c000-568a-11ea-8b3b-e414cb0b8c6b.png" alt="Screenshot_20200223_222330" style="max-width: 100%;"></a></p>
<h4 dir="auto">v7.1.13</h4>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/291301/75118348-5f25a680-568a-11ea-8a18-7fb253ea90e6.png"><img src="https://user-images.githubusercontent.com/291301/75118348-5f25a680-568a-11ea-8a18-7fb253ea90e6.png" alt="Screenshot_20200223_221938" style="max-width: 100%;"></a></p>
<h4 dir="auto">v8.0.1</h4>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/291301/75118421-115d6e00-568b-11ea-9d1e-30dc4201fb17.png"><img src="https://user-images.githubusercontent.com/291301/75118421-115d6e00-568b-11ea-9d1e-30dc4201fb17.png" alt="Screenshot_20200223_222409" style="max-width: 100%;"></a></p>
<h4 dir="auto">9.0.0-beta.2</h4>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/291301/75118467-7ca74000-568b-11ea-830f-2cfe2a11ba73.png"><img src="https://user-images.githubusercontent.com/291301/75118467-7ca74000-568b-11ea-830f-2cfe2a11ba73.png" alt="Screenshot_20200223_222754" style="max-width: 100%;"></a></p>
<h3 dir="auto"></h3>
<h3 dir="auto">Additional Information</h3>
<ul dir="auto">
<li>Documented here: <a href="https://www.electronjs.org/docs/api/browser-window#new-browserwindowoptions" rel="nofollow">https://www.electronjs.org/docs/api/browser-window#new-browserwindowoptions</a></li>
<li>This does not seem to be a duplicate of closed <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="425188730" data-permission-text="Title is private" data-url="https://github.com/electron/electron/issues/17543" data-hovercard-type="issue" data-hovercard-url="/electron/electron/issues/17543/hovercard" href="https://github.com/electron/electron/issues/17543">#17543</a>, as this affects only versions starting from v7.0.0.</li>
<li>This does not seem to be a problem of specific configuration/url/scheme/whatever -- I was not able to make that option work on a recent Electron version with any attempted configuration.</li>
</ul>