fredsa / gwt-dnd

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

Screen jumps when drag begins #127

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?   Using 
sources, most recent, but saw problems in 3.0.1.jar as well.

What operating system(s) are you using? Windows? Linux? Mac?  Mac OS X 10.6.4

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.

See the attached source-code file.

1) Launch the application in Eclipse and run it in FIrefox.
2) Scroll down so that the "[drag me]" widget is visible. Put it about an inch 
from the top of the page, so that the bottom inch of the <div> above the widget 
is visible.
3) Pick up the "[drag me]" widget and start dragging (the error occurs on the 
move, not the click)
4) The scrren jumps --- it scrolls down an inch or so.

In a full blown application, this jump is very disconcerting, as the drop 
target can scroll off the screen entirely. 

Do you have a workaround?  No.

Please provide any additional information below.

Original issue reported on code.google.com by allen.holub@gmail.com on 29 Sep 2010 at 5:14

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 11:04

GoogleCodeExporter commented 9 years ago
I am encountering this issue as well when the draggable widget is larger than 
the current window size. For example, if my draggable widget is 1000px tall and 
the window size is only 800, the draggable widget always snaps to the bottom of 
the scroll container (my drop target). Disabling BehaviorScrollIntoView 
corrects this but my users need to be able to scroll while dragging.

For me, there is no difference between quirks mode and standard mode.

Original comment by bradley....@gmail.com on 13 Oct 2011 at 2:49

GoogleCodeExporter commented 9 years ago
Please use standard mode, i.e, specify a standards mode DOCTYPE on your main 
HTML page

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