Hi I have a Div, with a fixed height and width, which set to overflow-x: hidden; overflow-y: scroll; Inside this Div is floated draggables. If i scroll down the list (1.6.2) and then drag one of these the draggable is offset from the mouse, by the amount scrolled (for both firefox and IE) in 1.6.3 this is now fixed for Firefox, whereby the draggable is locked to the mouse. In IE however, it is inverted, so that it is higher up on the mouse (alot higher) this was the inverse in 1.6.2 I''ve used perforce to do a diff on the dragdrop.js file and could''nt find any single thing to attribute to this fix. I''m glad the bug is fixed in firefox. but unfortunatly my boss is masochistic man who insists on this web application working in IE :S I have created a screengrab of the issue, http://www.envoy-promote.com/error.jpg --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
It seems in my haste, one of the changes to the dragdrop.js i did''nt test. I have found that on line 449: draw: function(point) { var pos = Position.cumulativeOffset(this.element); if(this.options.ghosting) { var r = Position.realOffset(this.element); window.status = r.inspect(); pos[0] += r[0] - Position.deltaX; pos[1] += r[1] - Position.deltaY; } changing it to: draw: function(point) { var pos = Position.cumulativeOffset(this.element); if (navigator.appVersion.indexOf("MSIE 6.0")==-1) if(this.options.ghosting) { var r = Position.realOffset(this.element); window.status = r.inspect(); pos[0] += r[0] - Position.deltaX; pos[1] += r[1] - Position.deltaY; } Fixes it. It seems that this code does not work for IE. but IE does not require it. Sorry i dont have more time to flesh out the reasons. You should hopefully have a better idea whats going on than me. P.S hats off to you guys, in the past 6 months almost every single site i''ve made i''ve had a use for your library. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Can you show us your code? A peek at your create options and CSS would be useful. Do you have the "scroll" option set to the id of your fixed-size div? TAG On Sep 5, 2006, at 8:16 AM, Malard wrote:> > Hi > > I have a Div, with a fixed height and width, which set to overflow-x: > hidden; overflow-y: scroll; > > Inside this Div is floated draggables. If i scroll down the list > (1.6.2) and then drag one of these the draggable is offset from the > mouse, by the amount scrolled (for both firefox and IE) in 1.6.3 this > is now fixed for Firefox, whereby the draggable is locked to the > mouse. > > In IE however, it is inverted, so that it is higher up on the mouse > (alot higher) this was the inverse in 1.6.2 > > I''ve used perforce to do a diff on the dragdrop.js file and could''nt > find any single thing to attribute to this fix. > > I''m glad the bug is fixed in firefox. but unfortunatly my boss is > masochistic man who insists on this web application working in IE :S > > I have created a screengrab of the issue, > http://www.envoy-promote.com/error.jpg > > > >--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
www.envoy-promote.com is the site that this is run on javascript is loaded similarly to how scriptaculous does it, there is www.envoy-promote.com/js/promote_loader.js this loads ../js/promote_load.js ../js/promote_core.js ../js/promote_auth.js ../js/promote_debug.js ../js/promote_error.js ../js/promote_graphics.js ../js/promote_lib.js ../js/promote_mail.js ../js/promote_save.js It then waits for them to be loaded before continuing. css is located www.envoy-promote/css/promote.css You can use username = demo password = demo to login. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
HI, I''m guessing this is a problem with Prototype.js and it''s get positioning code. Differences in how many positioning parents need to be used to calculate the offset. Differences in browsers to get the amount by which a page is scrolled and quirks mode or strict etc. Did you try different DOCTYPES? Peter On 9/5/06, Malard <malard-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > Hi > > I have a Div, with a fixed height and width, which set to overflow-x: > hidden; overflow-y: scroll; > > Inside this Div is floated draggables. If i scroll down the list > (1.6.2) and then drag one of these the draggable is offset from the > mouse, by the amount scrolled (for both firefox and IE) in 1.6.3 this > is now fixed for Firefox, whereby the draggable is locked to the mouse. > > In IE however, it is inverted, so that it is higher up on the mouse > (alot higher) this was the inverse in 1.6.2 > > I''ve used perforce to do a diff on the dragdrop.js file and could''nt > find any single thing to attribute to this fix. > > I''m glad the bug is fixed in firefox. but unfortunatly my boss is > masochistic man who insists on this web application working in IE :S > > I have created a screengrab of the issue, > http://www.envoy-promote.com/error.jpg > > > > >--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
No, I have designed the site for a 1.1 Strict DOCTYPE any other types will collapse the design. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type"> <title></title> </head> <body bgcolor="#ffffff" text="#000000"> Moin List :-)<br> <br> I''m trying to create a new DIV, turn it draggable and start the drag process on the fly.<br> Here is what I need to do:<br> The user selects text within a textarea. Then he holds the CTRL key and the left mouse button down and starts to move his mouse.<br> Once the mouse movement has started I create a new Div on the fly using the "Builder.node" function. This new DIV contains the selected text. This DIV is then turned draggable. <br> Now I would like to manually(from my code) init a "Drag" process (move my div under the mouse cursor and follow the mouse movements like a normal Drag process). <br> Is there a function in scriptaculous to do this (set a Draggable element to be dragged like if the user clicked on it) ?<br> I already tried Draggables.activate(element) but this doesn''t work<br> <br> Thanks for your help<br> <br> <br> <div class="moz-signature">-- <br> <font size="2"><font face="Courier New">Fred</font></font><span lang="fr-fr"><font color="#008000" face="Arial Unicode MS" size="2"></font></span><span lang="fr"></span><span lang="fr-fr"></span><br> <span><font color="#008000" face="Webdings" size="5">P</font></span><span lang="fr-fr"><font color="#008000" face="Arial Unicode MS" size="2">Please consider the environment - do you really need to print this email ?</font></span><span lang="fr"></span><span lang="fr-fr"></span> </div> <br> --~--~---------~--~----~------------~-------~--~----~<br> You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. <br> To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org <br> To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org <br> For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en <br> -~----------~----~----~----~------~----~------~--~---<br> </body> </html> <br>
The following snippet is from an working application (although I don''t vouch for this edited down snippet). In this instance, I was re-creating the Draggable several levels higher in the tree than the original list to overcome the overflow:scroll problem. Something similar should work for just-in- time Draggable creation, if you decided to create the Draggable on mousedown rather than on page load. It should work for the case you''re describing to. onMouseDown: function (event) { if (!Event.isLeftClick(event)) {return;} var div = document.createElement("div"); // ... // Set new div position var d = new Draggable(div, {revert: false, ghosting: false // ... }); //The following two lines, in particular, are what you''re looking for, I think d.initDrag(event); Draggables.updateDrag(event); } TAG On Dec 11, 2006, at 6:13 AM, Frédéric JECKER wrote:> Moin List :-) > > I''m trying to create a new DIV, turn it draggable and start the > drag process on the fly. > Here is what I need to do: > The user selects text within a textarea. Then he holds the CTRL key > and the left mouse button down and starts to move his mouse. > Once the mouse movement has started I create a new Div on the fly > using the "Builder.node" function. This new DIV contains the > selected text. This DIV is then turned draggable. > Now I would like to manually(from my code) init a "Drag" process > (move my div under the mouse cursor and follow the mouse movements > like a normal Drag process). > Is there a function in scriptaculous to do this (set a Draggable > element to be dragged like if the user clicked on it) ? > I already tried Draggables.activate(element) but this doesn''t work > > Thanks for your help > > > -- > Fred > PPlease consider the environment - do you really need to print this > email ? > > >--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type"> <title></title> </head> <body bgcolor="#ffffff" text="#000000"> Hi<br> <br> Thanks for your help, it was exactly what I was looking for but unfortunately it doesn''t work, the drag process is not started<br> maybe this is due to the fact that the drag process is started within the textarea an that the default textarea drag behaviour is started before.<br> <br> Fred<br> <br> Tom Gregory a écrit : <blockquote cite="midDFB956F1-A61A-423D-BB13-1CFE06711174-PGZyUNKar/Q@public.gmane.org" type="cite"> <div>The following snippet is from an working application (although I don''t vouch for this edited down snippet).</div> <div><br class="khtml-block-placeholder"> </div> <div>In this instance, I was re-creating the Draggable several levels higher in the tree than the original list to overcome the overflow:scroll problem. Something similar should work for just-in-time Draggable creation, if you decided to create the Draggable on mousedown rather than on page load.</div> <div><br class="khtml-block-placeholder"> </div> <div>It should work for the case you''re describing to.</div> <div><br class="khtml-block-placeholder"> </div> <div>onMouseDown: function (event) {</div> <div><span class="Apple-tab-span" style="white-space: pre;"> </span>if (!Event.isLeftClick(event)) {return;}</div> <div><span class="Apple-tab-span" style="white-space: pre;"> </span>var div = document.createElement("div");</div> <div><span class="Apple-tab-span" style="white-space: pre;"> </span>// ...<span class="Apple-tab-span" style="white-space: pre;"></span></div> <div><span class="Apple-tab-span" style="white-space: pre;"> </span>// Set new div position</div> <div><span class="Apple-tab-span" style="white-space: pre;"> </span>var d = new Draggable(div, </div> <div><span class="Apple-tab-span" style="white-space: pre;"> </span>{revert: false,</div> <div><span class="Apple-tab-span" style="white-space: pre;"> </span>ghosting: false</div> <div><span class="Apple-tab-span" style="white-space: pre;"> </span> // ...</div> <div><span class="Apple-tab-span" style="white-space: pre;"> </span>});</div> <div><span class="Apple-tab-span" style="white-space: pre;"> </span>//The following two lines, in particular, are what you''re looking for, I think</div> <div><span class="Apple-tab-span" style="white-space: pre;"> </span>d.initDrag(event);</div> <div><span class="Apple-tab-span" style="white-space: pre;"> !<br> <br> <br> <br> </span>Draggables.updateDrag(event);</div> <div> }</div> <div><br class="khtml-block-placeholder"> </div> <div><br class="khtml-block-placeholder"> </div> <div>TAG</div> <br> <div> <div>On Dec 11, 2006, at 6:13 AM, Frédéric JECKER wrote:</div> <br class="Apple-interchange-newline"> <blockquote type="cite"> Moin List :-)<br> <br> I''m trying to create a new DIV, turn it draggable and start the drag process on the fly.<br> Here is what I need to do:<br> The user selects text within a textarea. Then he holds the CTRL key and the left mouse button down and starts to move his mouse.<br> Once the mouse movement has started I create a new Div on the fly using the "Builder.node" function. This new DIV contains the selected text. This DIV is then turned draggable. <br> Now I would like to manually(from my code) init a "Drag" process (move my div under the mouse cursor and follow the mouse movements like a normal Drag process). <br> Is there a function in scriptaculous to do this (set a Draggable element to be dragged like if the user clicked on it) ?<br> I already tried Draggables.activate(element) but this doesn''t work<br> <br> Thanks for your help<br> <br> <br> <div class="moz-signature">-- <br> <font size="2"><font face="Courier New">Fred</font></font><span lang="fr-fr"></span><span lang="fr"></span><span lang="fr-fr"></span><br> <span><font color="#008000" face="Webdings" size="5">P</font></span><span lang="fr-fr"><font color="#008000" face="Arial Unicode MS" size="2">Please consider the environment - do you really need to print this email ?</font></span><span lang="fr"></span><span lang="fr-fr"></span> </div> <br> <br> <br> </blockquote> </div> </blockquote> <br> <br> <div class="moz-signature">-- <br> <p class="MsoNormal"><font face="Courier New" size="2"><span style="font-size: 10pt; font-family: "Courier New";"><br> ________________________________________</span></font><br> <font face="Arial" size="1"><span style="font-size: 9pt; font-family: Arial;"><b><span style="font-weight: bold;"><o:p></o:p></span></b></span></font></p> <font face="Arial" size="1"><span style="font-size: 9pt; font-family: Arial;"><b>Frédéric JECKER</b><br> Direction des systèmes d’information<br> Centre Hospitalier Rouffach<br> F- 68250 ROUFFACH<br> <b><span style="font-weight: bold;">Tél :</span></b> +33 (0)3 89 78 74 21<br> <b><span style="font-weight: bold;">Fax :</span></b> +33 (0)3 89 78 74 35<br> <b><span style="font-weight: bold;">Courriel :</span></b> <a class="moz-txt-link-abbreviated" href="mailto:f.jecker-Q24KPKXrcE4YLvoOxY5KjA@public.gmane.org">f.jecker-Q24KPKXrcE4YLvoOxY5KjA@public.gmane.org</a><br> <b><span style="font-weight: bold;">Web :</span></b> <a href="http://www.ch-rouffach.fr">http://www.ch-rouffach.fr</a></span></font><br> <span><font color="#008000" face="Webdings" size="5">P</font></span><span lang="fr-fr"><font color="#008000" face="Arial Unicode MS" size="2">Faites un geste pour l''environnement - avez vous réellement besoin d''imprimer ce courriel ?</font></span><span lang="fr"></span><span lang="fr-fr"></span><br> <span><font color="#008000" face="Webdings" size="5">P</font></span><span lang="fr-fr"><font color="#008000" face="Arial Unicode MS" size="2">Please consider the environment - do you really need to print this email ?</font></span><span lang="fr"></span><span lang="fr-fr"></span> </div> <br> --~--~---------~--~----~------------~-------~--~----~<br> You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. <br> To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org <br> To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org <br> For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en <br> -~----------~----~----~----~------~----~------~--~---<br> </body> </html> <br>