Ie

Using Event.preventDefault() In Internet Explorer 8

Posted by Weston Ganger on July 01, 2015

Internet Explorer can be a major pain. Apparently event.preventDefault is not implemented in IE8. I know that IE8 is now no longer supported but I thought it would be useful to post this workaround anyways.

Anytime you want to use event.preventDefault() just replace it with this expression.


(event.preventDefault) ? event.preventDefault() : event.returnValue = false;


Related External Links:


Posted in Web Development and Tagged with internet-explorer 


Need help on your next project or application?

I specialize in Ruby-on-Rails, AngularJS, Javascript, Bootstrap, and Hybrid Mobile Apps with Cordova & Ionic.

Contact Me

Recommended Posts