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?
Interesting Update:
Try this demo: http://jqueryui.com/demos/dialog/#modal-message 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.
Update 2
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.
Update 3
The following seems to work for now:
$(document).keydown(function(e)
{
if (e.which == 116) // key code of the F5 button
{
document.location.reload();
}
});