Subwindow position in (Liferay) portlet


we have a problem with the position of subwindows in a Liferay portlet.

When I use myWindow.setPositionX and myWindow.setPositionY in a Vaadin web-app (non-portlet), the position is relative to the current browser window. This does not change when the page does not fit in the current browser window and the user has scrolled to the bottom of the page. In the end, you can always see your subwindow in the visible part of your browser window (as long as it has been positioned not too far from the top).

The same thing in a Liferay portlet results in a subwindow relative to the potentially hidden page (when scrolled), i.e., after scrolling down, the subwindow may open in a currently invisible part of the page, which is not very nice.
Is is possible to get the same behaviour described above (web-app) for the portlet as well. Any other work-arounds or suggestions?