Scrolling in the Main Window

The main parent window has been made modal and unaccessible by setting dhtmlxwindow’s setModal property:
var dhxWins = new dhtmlXWindows();

w1 = dhxWins.createWindow("w1 ", 20, 20, 100, 200);
w1 .setModal(true);
w1 .keepInViewport(true);

But if we scroll in the main parent window, the portion after scrolling in the main window becomes accessible.
So, how can we set the modal property in such a way that even after scrolling in the parent window, the portion behinf the scroll is unaccessible. i.e., scrolling should not make the parent window accessible and dhtmlxwindow as still modal.

Try to define the div as a viewport. It could be a div that contains all other content of a page: