ok, this was my mistake. it seems we sometimes pass Event.stop an object which is not an event.
On 23 מרץ, 14:46, "T.J. Crowder" <[email protected]> wrote: > Hi, > > I definitely successfully used Event#stop with FF2 in Prototype 1.6 at > some point. Can you post a minimalist, but complete, example > demonstrating the problem? (Perhaps to Pastie[1]) > > [1]http://pastie.org > > > which seems to add dummy function if we use IE. > > Not so much *dummy* functions, as functions to provide the standard > behavior on IE (since it doesn't provide it). > -- > T.J. Crowder > tj / crowder software / com > Independent Software Engineer, consulting services available > > On Mar 23, 12:30 pm, doron <[email protected]> wrote: > > > Does anyone know about a fix for this problem: Prototype.js event.stop > > (event) FF2 not working (http://www.ruby-forum.com/topic/146797) ? > > > I have encountered this bug while migrating to Prototype 1.6.0.3 > > The error appeared in FF2. > > It works fine in IE6, and I am not sure about FF3 or Chrome. > > > What I see in the code it that while in Prototype 1.5.1.1 the function > > looked like that: > > > stop: function(event) { > > if (event.preventDefault) { > > event.preventDefault(); > > event.stopPropagation(); > > } else { > > event.returnValue = false; > > event.cancelBubble = true; > > } > > } > > > in prototype 1.6.0.3 it looks like that: > > > stop: function(event) { > > Event.extend(event); > > event.preventDefault(); > > event.stopPropagation(); > > event.stopped = true; > > } > > > but there is also this code: > > > if (Prototype.Browser.IE) { > > Object.extend(methods, { > > stopPropagation: function() { this.cancelBubble = true }, > > preventDefault: function() { this.returnValue = false }, > > inspect: function() { return "[object Event]" } > > }); > > > which seems to add dummy function if we use IE. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Prototype & script.aculo.us" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en -~----------~----~----~----~------~----~------~--~---
