Search code examples
jquerygwtpopuppanel

GWT PopupPanel imgAreaSelection scroll does not work


I am using a GWT PopupPanel that has an image. I add imgAreaSelect using jQuery to the image on the load of the panel.

The cropping works absolutely fine when I do not scroll the main window. However, if I scroll the main window, the selection breaks (the area of the imgAreaSelect object seems to be fixed). The modal window or popup panel seems to be moving with the page, but the area of imgAreaSelect does not.

Any recommended solutions?


Solution

  • If anybody is looking for a solution to this, it is to set the 'parent' option as the modal div that contains the image. The default value for the 'parent' option is 'body'. So changing it to the immediate parent resolved the issue.