Hey there, I'm currently facing an issue with popups on my Blazor WebAssembly application when accessed through mobile phones.
On my website, users need to zoom in on the mobile version to interact with certain objects that trigger a popup to appear. The problem is, these popups always show up at the top left corner of the original viewport, which becomes problematic for users who have zoomed in and shifted the viewport. My goal is to make sure that the popup appears at the center of the user's current viewport, regardless of any zooming or shifting they may have done. Does anyone have any suggestions on how to achieve this?
Currently, I am using the following CSS:
.modal {
bottom: 0;
left: 0;
margin: auto;
max-height: 500px;
max-width: 600px;
min-width: 300px;
position: fixed;
right: 0;
top: 0;
}
Here are some screenshots for reference: