Using Event.preventDefault() In Internet Explorer 8

Posted by Weston Ganger

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:

Article Topic:Software Development - Web Development

Date:July 01, 2015

Recommended Posts