fredsa / gwt-dnd

Library providing easy to use mouse or touch based drag-and-drop capabilities to GWT
43 stars 41 forks source link

HorizontalPanelDropContoller works only at the top of the page (probably related to Issue 127) #128

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What version of GWT are you using? 1.3.3? 1.4.60? Other?
2.0.4
What version of the gwt-dnd jar file or library file are you using?
3.0.1
What operating system(s) are you using? Windows? Linux? Mac?
Mac
Does the issue occur in web mode, hosted mode, both or don't know?
hosted mode (don't know about web mode).
What browser(s) do you use? Firefox, IE, Safari, other?
Firefox
What is the browser version (if you know) from Help->About?
3.6.10
What steps will reproduce the problem? Please attach sample code if you
can.

Given the Test.java class in the attached file,

If your onModuleLoad does this:
<pre>
        RootPanel contentArea = RootPanel.get("app-area");
        // contentArea.add( new HTML("<div style='height:8in; border:1px solid lightblue;'></div>"));
        contentArea.add( new HTML("<h2>DragDrop Test</h2>") );
        contentArea.add( new Test() ); 
        contentArea.add( new HTML("<hr/>") );
        // contentArea.add( new HTML("<div style='height:8in; border:1px solid lightblue;'></div>"));
</pre>
then everything works. However, if you add the two divs (by uncommenting the 
two lines, above), then scroll the page down so that the horizontal panel is 
visible, the drops don't work any more. In fact, the drop target seems unaware 
that a drag operation is in progress.

What is the expected output? What do you see instead?

I expect to be able to change the positions of the items in the horizontal 
panel. That doesn't work.

Do you have a workaround?

None.

Please provide any additional information below.

This bug is probably related to Issue 127. I've tried rolling back both GWT 
versions and gwt-dnd versions, and the bug seems present in all the prior 
versions as well.

Original issue reported on code.google.com by al...@holub.com on 13 Oct 2010 at 7:23

Attachments:

GoogleCodeExporter commented 9 years ago
I was able to reproduce this in quirks mode, but not in standards mode.

As a workaround (if you can't use standards mode) call:
      dragController.setBehaviorScrollIntoView(false);

In other words, I think the underlying issue is a bug with DOM.scrollIntoView()

Original comment by fredsa@google.com on 20 Oct 2010 at 10:41

GoogleCodeExporter commented 9 years ago
Please use a standard mode DOCTYPE on the main HTML page

Original comment by fredsa on 31 Jan 2012 at 6:30