stop: function(event) { if (event.preventDefault) { event.stopPropagation(); event.preventDefault(); } else { event.returnValue = false; event.cancelBubble = true; } } /* br original stop: function(event) { Event.extend(event); event.preventDefault(); event.stopPropagation(); event.stopped = true; } */ }; --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
Accidentally hit enter before finished. Firefox 2 event is not being cancelled. In IE it works fine. I need to use Prototype 1.6 although I tried the code from 1.5 because from all Ive read, it should be this easy, but doesnt work. stop: function(event) { //from prototype 1.5 if (event.preventDefault) { event.stopPropagation(); event.preventDefault(); } else { event.returnValue = false; event.cancelBubble = true; } } /* br original prototype 1.6 stop: function(event) { Event.extend(event); event.preventDefault(); event.stopPropagation(); event.stopped = true; } */ }; --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
Can you post the even observer setup code and maybe the markup too? -justin --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
Im using script.aculo.us for dragging and dropping with prototype.js 1.6.0.1 http://www.prototypejs.org/ the code above was taken from prototype 1.5 as an attempt to try to get it to work. Im not sure i can include all the code in a way that would make sense...the scritpaculous code is taking care of pretty much all of it. Sortable.create(''boxes'', { //ghosting:true is bad for ul/li lists, causes ie error overlap:''horizontal'', constraint: false }) On Mar 21, 2:05 pm, "Justin Perkins" <justinperk...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Can you post the even observer setup code and maybe the markup too? > > -justin--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
I have a sortable ul via scriptaculous, which uses prototype.js 1.6. The ul''s contain <a href to photos In IE: if you click on a photo and drag, the drag happens and it cancels the <a href In Firefox: the drag happens, but the <a also happens. It appears that IE is canceling correctly, and FF is not. I set up an example...Yes there is a JS error on load that you just bypass. http://www.connexion.org/scriptaculous/dragdroptest.cfm It seems to me that the issue lies in prototype.js --> stop:function(event) --> Event.extend=(function() { } else { Event.prototype = Event.prototype || document.createEvent("HTMLEvents").__proto__; Object.extend(Event.prototype, methods); return Prototype.K; } It appears to me that for the ie case the methods are being set correctly as far as cancelBubble/returnValue... FF apparenly needs preventDefault On Mar 21, 2:05 pm, "Justin Perkins" <justinperk...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Can you post the even observer setup code and maybe the markup too? > > -justin--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---