I have many popup window.open, used to search for an item, that call back a javascript function from the window.opener to select that item (when the user click on it).
That worked forever in all browsers, but it is not into Edge. I found out that window.opener is "undefined" in Edge only. It doesn't matter if I try it locally or on my web server, I got the same problem. And it can't be a security cross-domain thing, my popup are pages from the same web site.
Is there something I missed about Edge? A new requirement the way we use window.open?
For example, if I have an input button that does:
window.open('search.aspx','searching');
and a javascript function into head part like:
function SelectItem(ID)
{
// insert magic here
alert('test');
}
The following javascript code from search.aspx doesn't work in Edge:
window.opener.SelectItem(123);
And if I changed it to
alert(window.opener);
I will see it is undefined.
Edit 1: No, it is not a duplicate of Window.opener in Microsoft Edge undefined when running at localhost. I already read this question before asking mine. My problem is happening not only from localhost, but from web server also. It is not a hostname problem.
Edit 2: Easy way to test it, I get the same problem from the w3schools "Try it yourself" example: https://www.w3schools.com/jsref/tryit.asp?filename=tryjsref_win_open3
Update (solution): I had this problem with Edge 38.14393 (Windows 10 version 1607). I just upgrade to Win10 version 1803 (Edge 42.17134) and now it's working fine as expected. Might been a bug in previous Edge version!