Opening a popup on separate monitor

Ryan Tse 1 Reputation point
2021-02-18T18:44:43.463+00:00

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?

Microsoft Edge
Microsoft Edge
A Microsoft cross-platform web browser that provides privacy, learning, and accessibility tools.
2,151 questions
ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
4,210 questions
Blazor
Blazor
A free and open-source web framework that enables developers to create web apps using C# and HTML being developed by Microsoft.
1,405 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Michael Wang-MSFT 1,051 Reputation points
    2021-02-19T07:35:23.773+00:00

    Hi, @Ryan Tse ,

    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

    0 comments No comments