Reputation: 461
Essentially the popup panel stays a fixed position to the browser panel - where as I want it to scroll with the page.
I've tried setting the CSS element of the popup panel, with 'position: fixed !important' but no success.
This question seems to explain a similar problem, but I'm still not exactly sure what the fix is supposed to be.
Any idea how to do this?
Upvotes: 4
Views: 3175
Reputation: 16079
You can add WindowScrollHandler by doing like this:
Window.addWindowScrollHandler(new Window.ScrollHandler() {
public void onWindowScroll(Window.ScrollEvent event) {
popupPanel.setPopupPosition(event.getScrollLeft()+fromLeft,
event.getScrollTop()+fromTop);
}
});
Upvotes: 3