Pergunta

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?

Foi útil?

Solução

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);
       }
    });
Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top