preventDefault() fails in IE8?
jquery-1.4.2.min.js
I'm trying to use the Alt+keyCode in my web-app and want to prevent the event from bubbling up to the browser.
The following works fine in FF & Chrome, no event propagation, but fails in IE8:
- $().ready(function() {
- $('html').keydown(function(event) {
- if (event.altKey) {
- if (event.altKey && event.keyCode == 83) { // 'S'
- save();
- }
- event.preventDefault();
- }
- });