title: Detail tags can be closed with click outside, but not with a click on the summary tag itself?
body: <p>For the following code:</p>
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>const allDropdowns = document.querySelectorAll(".main-nav__dropdown");
  
  window.addEventListener("click", (e) =&gt; {
    [...allDropdowns].forEach((dropdown) =&gt; (dropdown.open = false));
  });</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;details class="main-nav__dropdown"&gt;
    &lt;summary&gt;First&lt;/summary&gt;
    &lt;ul&gt;
      &lt;li&gt;&lt;a href="#"&gt;First&lt;/a&gt;&lt;/li&gt;
      &lt;li&gt;&lt;a href="#"&gt;Second&lt;/a&gt;&lt;/li&gt;
      &lt;li&gt;&lt;a href="#"&gt;Third&lt;/a&gt;&lt;/li&gt;
      &lt;li&gt;&lt;a href="#"&gt;Fourth&lt;/a&gt;&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/details&gt;
  
  &lt;details class="main-nav__dropdown"&gt;
    &lt;summary&gt;Second&lt;/summary&gt;
    &lt;ul&gt;
      &lt;li&gt;&lt;a href="#"&gt;First&lt;/a&gt;&lt;/li&gt;
      &lt;li&gt;&lt;a href="#"&gt;Second&lt;/a&gt;&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/details&gt;</code></pre>
  </div>
  </div>
  </p>
  <p>Why don't the dropdowns close whenever I click on the <code>summary</code> itself and how can I get it to work?</p>