Prototype 1.6, Event.stop and IE9 – Quick patch
For those of you using Prototype 1.6 (or Magento prior 1.6), you might wonder why event.stop() or Event.stop(event) doesn’t work in Internet Explorer 9. Here’s a quick explanation:
IE 9 makes major changes to the event system. We had to rewrite the
event code in 1.7 to support it. You can either (a) upgrade to 1.7;
(b) force your site into compatibility mode [1].
So it’s been fixed in 1.7, but what if I can’t upgrade to 1.7 and don’t want to render my website in compatibility mode? Well, after a couple of hours trying to sort this out, here’s quick (and dirty) patch for Prototype 1.6.0.3. Prototype 1.6.0.3 Event.stop IE9 fix (1356 downloads)
Also, for further reading, here are two external links that you might find useful for this issue.
- https://prototype.lighthouseapp.com/projects/8886-prototype/tickets/1264
- http://groups.google.com/group/prototype-scriptaculous/browse_thread/thread/475eddbc3decfd23/31af63a49ac77b8a
Note/Disclaimer: This has only been tested on Prototype 1.6.0.3. Use it at your own risk.
not sure what the problem is on IE8, but the patch was for stopping events on IE9
Did not work for me as well, but as mentioned here (http://stackoverflow.com/questions/1000597/event-preventdefault-function-not-working-in-ie) in comments by jmort253, event must be a global for IE8, did that for me in IE9 as well.
Strange, as it’s the version I use on a production server and work perfectly fine. At least when it comes to Event.stop which wasn’t working on IE9. Can you detail a little bit?
This does not work at all for me.