argsv@technologicaleden.com
2005-Jul-19 15:20 UTC
[Rails-spinoffs] Nested drag and drop rendering issue with ie
First and foremost, excellent library - excellent work. Thank you. Now, here''s what I''m doing: <div id="wrapper"> <fieldset id="page_1"> <legend>Page</legend> <fieldset id="group_1"> Group </fieldset> <fieldset id="group_2"> Group </fieldset> </fieldset> <fieldset id="page_2"> <legend>Page</legend> <fieldset> Group </fieldset> </fieldset> </div> Both the ''pages'' and ''groups'' are setup up as sortable drag and drops. This works well in Firefox. On IE though, when clicking and moving a group(inner child), the parent is also moved causing quite a mess. I''ve tracked the problem down to the startDrag function of the Draggable object. I fixed the issue by adding the code below. startDrag: function(event) { //**MOD BELOW*/ if (!event) var event = window.event; event.cancelBubble = true; if (event.stopPropagation) event.stopPropagation(); //**MOD ABOVE**/ I have no idea if this is the best solution, I just started working the lib yesterday, but it works for me currently. argsv
Thomas Fuchs
2005-Jul-19 16:48 UTC
[Rails-spinoffs] Nested drag and drop rendering issue with ie
There''s a bug in the Prototype library that causes event bubbling on IE, so this will probably fixed soon, thx for reporting this anyway. :) Thomas Am 19.07.2005 um 21:15 schrieb argsv@technologicaleden.com:> First and foremost, excellent library - excellent work. Thank you. > Now, here''s what I''m doing: > <div id="wrapper"> > <fieldset id="page_1"> > <legend>Page</legend> > <fieldset id="group_1"> > Group > </fieldset> > <fieldset id="group_2"> > Group > </fieldset> > </fieldset> > > <fieldset id="page_2"> > <legend>Page</legend> > <fieldset> > Group > </fieldset> > </fieldset> > </div> > Both the ''pages'' and ''groups'' are setup up as sortable drag and > drops. This works well in Firefox. On IE though, when clicking > and moving a group(inner child), the parent is also moved causing > quite a mess. I''ve tracked the problem down to the startDrag > function of the Draggable object. I fixed the issue by adding the > code below. > startDrag: function(event) { > //**MOD BELOW*/ > if (!event) var event = window.event; > event.cancelBubble = true; > if (event.stopPropagation) event.stopPropagation(); > //**MOD ABOVE**/ > I have no idea if this is the best solution, I just started working > the lib yesterday, but it works for me currently. > argsv > _______________________________________________ > Rails-spinoffs mailing list > Rails-spinoffs@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs >