title: Refresh (F5) not working in jQuery Dialog
body: <p>I am using the jquery dialog widget to display a modal box. However when pressing F5, while the modal is open no refresh happens. Any idea?</p>
  
  <p><strong>Interesting Update:</strong></p>
  
  <p>Try this demo: <a href="http://jqueryui.com/demos/dialog/#modal-message" rel="noreferrer">http://jqueryui.com/demos/dialog/#modal-message</a>
  Now when the focus is on the "ok" button, then the refresh (F5) works, however when the button does not have the focus, then it doesn't.</p>
  
  <p><strong>Update 2</strong></p>
  
  <p>We can actually just add any kind of control to the dialog, set the height and width to 0 css and set the focus on it to get the refresh working. This is not the best solution though. I am still trying to get keypress working.</p>
  
  <p><strong>Update 3</strong></p>
  
  <p>The following seems to work for now:</p>
  
  <pre><code>$(document).keydown(function(e)
  {
      if (e.which == 116) // key code of the F5 button
      {
          document.location.reload();
       }
  }); 
  </code></pre>