Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Drag operation starts even when mouse is not moved - stops mousedown from reaching Vaadin #26

Open
uroojshaikh opened this issue Jan 5, 2015 · 2 comments

Comments

@uroojshaikh
Copy link

Hi, we are using dragdroplaouts 0.8.2 with Vaadin 6.8.3 on tomcat 7.

Our app has 'tiles' which show different items such as reports, charts etc.The title area of the tile can be used to drag tiles to different positions on the user's screen. The title area also has buttons for configuring the tile settings etc. When I drag the title it moves the title while clicking on a button underlying the title causes the button to be pressed. Please see below

image

Most of the time things work flawlessly, but about 1 in 5 times, when we start the server, the title drag starts on the mousedown even when no mouse is moved. Clicking on the buttons just makes the title area go blurry (as if I had started the drag) and the button doesnt receive the click.

Using Chrome's debugger, I see a mousedown followed by a mousemove EXACTLY 0.01 seconds after. This also happens in IE, but not in Firefox. We have about 10 developers and it happens sporadically on all their machines. It is very difficult to reliably reproduce.

WE REALLY NEED HELP AS THIS IS THE LAST MAJOR ISSUE PREVENTING US FrOM LAUNCHING OUR PRODUCT!

Any ideas what is going on?

The Tile class extends DDVerticalLayout and the Drag title is a HorizontalLayout (with buttons inside) and wrapped in a DragAndDropWrapper.

The vaadin project also uses external javascript libraries, namely:
jquery-1.11.2.js
highcharts.js

Any help you can give us will be much appreciated!

Thanks in advance.

@johndevs
Copy link
Contributor

johndevs commented Jan 5, 2015

The DragAndDropWrapper in Vaadin used to have a bug where a drag started on a click which sounds very similar to what you are experiencing.

The ticket is http://dev.vaadin.com/ticket/12838 and it was fixed like this https://dev.vaadin.com/review/#/c/4667/3/client/src/com/vaadin/client/ui/VDragAndDropWrapper.java

Since you are on Vaadin 6 you might need to backport the patch yourself or ask the Vaadin guys if they want to do it.

@uroojshaikh
Copy link
Author

Thanks for the prompt answer. I've backported the fix, verified its in the widgetset by adding my own VConsole.log (which is triggering), but the problem is still there.

Also, looking at the code it looks like it just sets the focus on the underlying control, (which fixes the original reported bug of text field etc not getting focus). But in our case its the click itself that gets eaten. Also only happens about 20% of the time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants