title: Javascript window does not disappear?
body: <p>I have a delete button in react that when clicked, my deleteHandler() is fired and the window comes up however when I try to click outside the window it doesnt disappear?
  So the user is forced to refresh the page to cancel the delete functionality.</p>
  <pre><code>  const deleteHandler = (id) =&gt; {
  if (window.alert('Are you sure you want to delete?')) {
    dispatch(deleteCoin(id));
    alert(`Coin of Lot# ${id} deleted successfully.`);
  }
  
  
  };
  </code></pre>