Many of the users on my platform are accidentally hitting the F5 key while typing, causing them to lose all their work. I don't want to completely block the ability to refresh the page.
I attempted using the following JavaScript solution, however it only seems to work when the user is not focused on the Silverlight application (i.e. if they click outside of the SL app, but the onkeydown event isn't triggered when the user is focused within the SL).
document.onkeydown=function(e) {
var event = window.event || e;
if (event.keyCode == 116) {
event.keyCode = 0;
alert("test");
return false;
}
}