title: Closing an HTML datalist dropdown on enter
body: <p>I have a datalist I'm using to select items from a list. I would like the datalist dropdown to close when:</p>
  
  <ol>
  <li>The user types the exact name of an options and presses enter, or</li>
  <li>The user clicks on an item in the datalist dropdown.</li>
  </ol>
  
  <p>Both Firefox and Chrome support (2). Firefox also supports pressing enter to close the dropdown. However, typing the option and pressing enter does <em>not</em> close the dropdown in Chrome.</p>
  
  <p>Is it possible to Firefox's behavior in Chrome, using Javascript if necessary?</p>
  
  <p>My only idea was to <code>blur</code> the datalist input, but the dropdown stayed open in Chrome.</p>
  
  <p>I'm running Firefox 68 and Chrome 75 if that's relevant.</p>