Windows.Open return null when running on MS Edge (while on IE 11 it runs fine)

aviad dror 1 Reputation point
2022-02-13T07:28:18.787+00:00

Hi

I have a Silverlight application that calls javascript functions.
I mainly use windows.open and print / save functions.

When the code runs on IE 11 it runs fine, when it runs on MS Edge (with compatibility mode to IE 11) the windows.open method return null and the application fails.
I must add that on some machines it actually work fine while on others it fails.

What can be the reason?

Thanks,

Aviad

Microsoft Edge
Microsoft Edge
A Microsoft cross-platform web browser that provides privacy, learning, and accessibility tools.
2,130 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. XuDong Peng-MSFT 10,101 Reputation points Microsoft Vendor
    2022-02-14T06:54:36.003+00:00

    Hi @aviad dror ,

    According to your description, I created a simple demo to reproduce this issue, and I found that when you add the opened website to Edge IE mode sitelist, you can get the returned handler from window.open method. But if the page opened by window.open method displayed in Edge(not in IE mode), then you will get null from this method.

    Something like this:

    syusZ.png

    As you can see, I use console.log() to display the handle object in the console, not null. So I think you can try to check the configuration I mentioned above.

    Best regards,
    Xudong Peng


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
    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.

    0 comments No comments

  2. aviad dror 1 Reputation point
    2022-02-15T11:05:14.06+00:00

    Hi

    Thanks for your prompt answer.

    I am kind of familiar with that approach and already configured it on my machines.

    The problem is that while it seems to work fine on windows server machines, on some of my windows 10 machine it does not seem to make any change and I still get that error indicating a null reference from windows.open.

    It seems that maybe some permissions issue or something similar may be causing it.

    Any other idea?

    Thanks,

    Aviad