Web: Open a WebDialog scrolls the underlying Webpage to top

I have a long Webpage [4000 Pixel], with some Images. I’m using the Implicit Instance = Off at all WebPages.

When the user click on a picture, I open a webdialog with this code:

DIM MZWebDialog_Detail as new MZWebDialogV_Details

The WebDialog opens, but it scrolls the underlying webpage to the top.
I can’t find a mistake in my code; I think it is a bug in Xojo?

Can I stop the WebDialog to scroll the underlying webpage?
Or the other way as bad solution, but ok: Can I I detect the x/y position where the user clicks and scroll back after the WebDialog is closed?

Perhaps without using JavaScript, a Xojo-only solution?

First of all it’s not a bug, per se because it was originally designed this way. But you could file a feature request to have it changed.


Or use a palette. But it won’t be modal.

It seems <https://xojo.com/issue/17969> already describes the issue. Can that be changed to a Feature Request?

If the webpage would be keept scrollable with an open modal dialog this would also help in situations where the dialog is larger then the browser window: <https://xojo.com/issue/33261>

Now I tried Sheet, Modal and Palette. All of them, scrolls the page up to the top. :frowning:

Perhaps the solution is something like “save the y-position”, and jump back after closing the sheet?

[ And I don’t want to say “this is a bug”, I’m only searching for a good solution. :slight_smile: ]

Use the WebContainer solution I posted at the link above.