title: Why do <select multiple> boxes scroll to the top with preventDefault in Chrome
body: <p>Every time I add an event listner that somehow does a <code>preventDefault</code> on a change to the select-box, it scrolls to the top.</p>
  
  <p>For a minimal example, see below:</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>document.getElementById('foo').onmousedown = function(e) {
    e.target.parentElement.focus();
    e.target.selected = !e.target.selected;
    e.preventDefault();
    return false;
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;select multiple size="5" id="foo"&gt;
  &lt;option&gt;1&lt;/option&gt;
  &lt;option&gt;2&lt;/option&gt;
  &lt;option&gt;3&lt;/option&gt;
  &lt;option&gt;4&lt;/option&gt;
  &lt;option&gt;5&lt;/option&gt;
  &lt;option&gt;6&lt;/option&gt;
  &lt;option&gt;7&lt;/option&gt;
  &lt;option&gt;8&lt;/option&gt;
  &lt;option&gt;9&lt;/option&gt;
  &lt;option&gt;10&lt;/option&gt;
  &lt;/select&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>Steps to reproduce this weird behaviour is:</p>
  
  <ol>
  <li>Click on option <code>2</code></li>
  <li>Scroll down a bit</li>
  <li>Click on any option-element</li>
  </ol>
  
  <p>Your view should now have scrolled up to have option <code>2</code> at the very top.</p>
  
  <p>This seems bizarre behaviour to me, which is really annoying.</p>
  
  <p>Follow-up question to this: how can I stop this from happening? I'm trying to make a script that makes <code>select multiple</code> boxes behave as if the ctrl-key is always pressed (see <a href="https://stackoverflow.com/a/48217702/1256925">https://stackoverflow.com/a/48217702/1256925</a>) but that code doesn't work when the <code>size</code> is greater than the amount of options listed.</p>
  
  <p><em>EDIT</em>: I've tested it in MS Edge (I don't have Firefox on this PC), and it seems to handle this correctly, so this might be a Chrome-only bug. If so, my follow-up question remains: how do I prevent Chrome from doing this? (Also, could someone update me on whether this happens in FF as well?)</p>