window.open opens a new tab instead of a new window (in chrome)

Viewed 10448

I have a code that used to open a popup window in all browsers, but now chrome started opening a new tab instead.

Does anyone knows what did they change and how do I open a popup window now?

This is my code:

function openWindow(url, title) {
  window.open(url, title, 'height=640,width=960,toolbar=no,menubar=no,scrollbars=no,location=no,status=no');
}
4 Answers

Generally / ALSO...

This seems to happen whenever you pass an invalid comma delimited "settings string" as your 3rd (settings) param, i.e. window.open(url, window_title, settings).

So, check your spelling, look for errors, make sure you haven't specified (passed in) incorrect/incompatible options in that string.

It seems when this happens the window.open() call will just ignore the whole OPEN IN A NEW WINDOW concept, and just opens the specified URL (as best it can retrieve it) in a new/next tab.

Related