mainwindow "scrolls" automatically

Hi everybody.

I have a dragable subwindow showing in my mainwindow. When you drag the subwindow out of the range of the mainwindow and then try to drag it again, the subwindow is centered. Actually the subwindow is not center, the mainwindow scrolls down/right to the subwindow.
My first question: Is there a possibility to avoid the centering of the subwindow?

If this is not possible:
I have to read the x and y coordinates of the subwindow. My idea:
get the x and y position via

event.getClientX() - subwindow.getPositionX() + mainWindow.getScrollLeft();

The problem is that the getScrollLeft()-position is 0 even if the mainwindow scrolled automaticly to the subwindow when I want to drag it.

Thanks for your help :slight_smile:

I think I have found a bug of vaadin:

I am opening a vaadin site with a downscaled browser with a subwindow, and the scrollbar is shown. When I am scrolling, the

subwindow.getScrollTop()

works fine. The subwindow is resizeable, when I resize the brwoser and the subwindow the scrollbar disappears, but

WindowTagdarstelluing.getScrollTop()

still have the same value like before. Normally it should be 0.

Does anybody have an idea how to solve this problem?

Currently I am setting the scrollTop and the ScrollLeft to 0 every time the window is resized (but this isn’t the best solution)

Is there a draglistener? So I could handle if somebody is dragging the subwindow out of the mainwindow. I just found a listener for dropping components via drag&drop.

best greetings