First, you cannot call event.cancelBubble , this is not a method, but a property that you can set to true .
To prevent special keys from working in IE by default, you also need to set the IE key code to 0:
function keydownHandler(e) { e = e || window.event; if (e.preventDefault) e.preventDefault(); else { e.cancelBubble = true; e.returnValue = false; e.keyCode = 0; } }
source share