question

RyanTse-0628 avatar image
0 Votes"
RyanTse-0628 asked miwan2-msft edited

Opening a popup on separate monitor

Hi, I'm a .Net developer currently working on an internal company website. We are developing in Blazor WASM and the site is mandated to run on the latest version of Edge only. My goal is to allow a popup to open (showing secondary information) on a second monitor in a multiple monitor setup. I am attempting to do this with Javascript. Again this is an internal tool, and an expected action. What I am noticing is that Edge seems to clamp down any sort of window.moveBy, window.resizeTo, window.moveTo. I also notice it ignores screenX values included in window.Open. What alternatives do I have? I've tried a few different things already: added the site to trusted sites, read https://bugs.chromium.org/p/chromium/issues/detail?id=137681#c117. I know of the experimental Microsoft screen enumeration features but I do not want to resort to experimental flags if possible. Is there also a source to read the actual Javascript limitations on this for Edge?

dotnet-aspnet-core-generalms-edgedotnet-aspnet-core-blazor
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

miwan2-msft avatar image
0 Votes"
miwan2-msft answered miwan2-msft edited

Hi, @RyanTse-0628,

For screen size you can use the screen object:

69860-ddf9ff3d-3d9e-48c3-8cbc-682bfb75ecca.png

You could try window.screen.width to get the total screen width of both monitors. Calculate the position 75% of whole width and show up using JQuery.

     jQuery("#dialog").dialog('option', 'position', [x,y]);


If the answer doesn’t solve your issue, please provide more details of error that will help us track down what’s happening.
If the answer is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


Best Regards,
Michael Wang




5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.