Stop Event In Ie 9 (without Upgrading To Prototype 1.7)
The site I'm working on uses Prototype 1.6.1. Its Event.stop() doesn't work in IE9. I know that Prototype 1.7 fixes the problem. However, is there a walk-around if I cannot upgrad
Solution 1:
function stopDefAction(evt) {
evt = evt || event;
if (evt.preventDefault) {
evt.preventDefault();
}
else {
evt.returnValue = false;
}
}
Solution 2:
It seems like internally Prototype does extend, which - under IE9 - breaks things. Without upgrading, the easy thing would be to add an x-ua-compatible meta tag at the tippy top of your head tag (but below the charset tag) to force IE9 into being IE less than 9.
If you have the ability, you could also try patching Prototype directly: http://mandagreen.com/prototype-1-6-event-stop-ie9-quick-patch/ This was written for 1.6.0, but I think it should work for 1.6.1. I have the same problem and will likely be trying it out to see what happens.
Post a Comment for "Stop Event In Ie 9 (without Upgrading To Prototype 1.7)"