#433 closed defect (fixed)
drag positioning is off for objects inside forms
Reported by: | bill | Owned by: | bill |
---|---|---|---|
Priority: | high | Milestone: | |
Component: | General | Version: | 0.2 |
Keywords: | Cc: | ||
Blocked By: | Blocking: |
Description
Try dragging the list inside the form in test_dragmove.html. It jumps to the top of the screen when you start to drag it. Fails on both IE6 and FF1.5
Attachments (1)
Change History (7)
comment:1 Changed 15 years ago by
Priority: | normal → high |
---|
Changed 15 years ago by
two new testcases, improved dnd code but not 100% ready
comment:2 Changed 15 years ago by
I've added two testcases for the dnd code that tests different positioning in stylesheets. refactored/improved the dnd code, but it isn't completely finished yet. Last time I looked some dragging was offset on IE. Unfortunately I have to leave this aside for a while, but if someone wants to continue with my code please do. It's in the attached dnd.zip file.
/Henrik Hjelte
comment:3 Changed 15 years ago by
Milestone: | 0.3release → 0.3.1 |
---|
The drag'n'drop problem has been fixed. There is a larger issue with dragMove that will be fixed post-0.3.
comment:4 Changed 15 years ago by
Owner: | changed from anonymous to bill |
---|---|
Status: | new → assigned |
test_dragmoveparent.html still has problems, namely divs jumping out of position on drag start, especially inside of <form>'s.
comment:5 Changed 15 years ago by
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
OK, I think I have fixed the test_dragmoveparent.html problem (famous last words) in [4285]
Copy of my mail to the dojo-interest mailing list: Subject: Re: [Dojo-interest] Drag and drop misaligned when embedded in scrolled div Date: Wed, 22 Feb 2006 15:23:21 +0100
I have now found the bug and a solution in the Dnd Code.
The symptom: To confirm that there is a bug in the recent trunk (revision 3155), try the test_dragmove.html test. If you drag the list after the row "This list is inside a form", you should see that the dragging starts from the top left of the page rather that from the correct position. At least it does for me in Firefox 1.07.
The cause: Some code was added which calculates a parentPosition in the onDragStart method of the HtmlDragObject? in the file HtmlDragAndDrop?.js. Then this parentPosition is subtracted from the actual position in onDragMove. This doesn't work.
The quick solution: Change line two and three of the onDragMove method of said object.
The big question: Why was the parentPosition code added? For me all the examples tests in the test files work correctly, but surely it must have been added for a reason? Is this related to browser specific problems? I haven't added IE to my Linux box yet, so I can't try it out now.
/Henrik Hjelte
On tor, 2006-02-16 at 13:14 +0100, henrik hjelte wrote: