window.open() popup=1 does not open popup in Google Chrome

98 Views Asked by At

In my web application, I am using the following code to open a new window as a popup:

window.open(
        '/auth',
        'mypopup',
        'popup=1,width=500,height=500'
      );

This code works as expected in Firefox, opening a new window with the specified dimensions. However, in Google Chrome, the window consistently opens as a new tab, seemingly ignoring the 'popup=1' attribute.

I've tried to control the behavior by explicitly setting the popup attribute, but it doesn't seem to have the desired effect in Chrome. Is there a cross-browser solution or workaround to ensure that the window opens as a popup in both Firefox and Chrome? I appreciate any insights or suggestions to address this discrepancy in browser behavior. Thank you!

0

There are 0 best solutions below