Hi, I have implemented the drag and drop feature to move around some divs, but I have a small side effect i am trying to clear: When the draggable div contains links, and if the user grab the div on the link, the drag is done but the link is also visited, leading to unwanted issues. What I''ve tried to do is to look for all ''a'' tags in the draggable elements in order to hook two functions on mouseover and mouseleave triggers There, I try to disable the drags by removing the event observer on the draggable mousemove trigger It kind of works, but not all the time (don''t ask me why :/) So, has anyone done this before and has a better solution ? I am using 1.4.0_rc3 but if IIRC, I didn''t see any changes on this area since the last version Cheers, Tarek -- Tarek Ziadé | Association AfPy | www.afpy.org Site personnel | http://programmation-python.org _______________________________________________ Rails-spinoffs mailing list Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs
Do you really need to make the entire div draggable? Why don''t you experiement with the handle: option? That way you can provide a handle to the div using which the drag can take place. Hope this helps! Thank you, Mandy. _______________________________________________ Rails-spinoffs mailing list Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs
On 1/20/06, Maninder, Singh <mandiv-W2hqgAdRMsX2eFz/2MeuCQ@public.gmane.org> wrote:> > Do you really need to make the entire div draggable? >Well, I could, but in my use case, i think it''s a better user experience to let the user drag from anywhere, here''s the demo: http://blogs.nuxeo.com/sections/blogs/tarek_ziade/2006_01_20_cps-ajaxification-round I have tried to let the users drag only from the icons but they don''t like it, I have also tried with an extra icon on the right of each element but they found the UI "heavy" then :) Why don''t you experiement with the handle: option?>yes that''s what I am using, and the <a> tags are inside the area Even though this is a special case, if it''s doable I bieleve it could be interesting for the Draggable objects to have some kind of blockers defined in their options. Tarek _______________________________________________ Rails-spinoffs mailing list Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs
i''d love that, infact it would be the same for the effects, because i have a blindup/blinddown toggle effect on a few divs and some of them contain links, however i need to have the whole div (except the link) trigger the effect. Tarek Ziadé wrote:> > On 1/20/06, *Maninder, Singh* <mandiv-W2hqgAdRMsX2eFz/2MeuCQ@public.gmane.org > <mailto:mandiv-W2hqgAdRMsX2eFz/2MeuCQ@public.gmane.org>> wrote: > > Do you really need to make the entire div draggable? > > > Well, I could, but in my use case, i think it''s a better user > experience to let the user drag > from anywhere, here''s the demo: > > http://blogs.nuxeo.com/sections/blogs/tarek_ziade/2006_01_20_cps-ajaxification-round > > I have tried to let the users drag only from the icons but they don''t > like it, > I have also tried with an extra icon on the right of each element but > they found the UI "heavy" then :) > > Why don''t you experiement with the handle: option? > > > yes that''s what I am using, and the <a> tags are inside the area > > Even though this is a special case, if it''s doable I bieleve it could > be interesting > for the Draggable objects to have some kind of blockers defined in > their options. > > Tarek > > > ------------------------------------------------------------------------ > > _______________________________________________ > Rails-spinoffs mailing list > Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs >