New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 596068 link

Starred by 27 users

Issue metadata

Status: Available
Owner: ----
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Android , Windows , Chrome , Mac
Pri: 1
Type: Bug



Sign in to add a comment

window.open('url', '', 'noopener') always opens in a modal popup

Reported by bobvanto...@adrime.com, Mar 18 2016

Issue description

UserAgent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/49.0.2623.87 Safari/537.36

Steps to reproduce the problem:
The problem can be reproduced by making a call to `window.open('url','','noopener');`

Alternatively you can use the code pen below to reproduce the problem:

  http://codepen.io/bobvt/pen/rejQbQ 

Additional HTML example:

``` html
<ul>
  <li>
    <a href="https://html.spec.whatwg.org/multipage/semantics.html#link-type-noopener" target="_blank" rel="noopener">rel=noopener</a>
  </li>
  <li>
    <a href="#" id="windowOpenLinkNoopener">window.open with noopener</a>
  </li>
  <li>
    <a href="#" id="windowOpenLink">window.open without noopener</a>
  </li>
</ul>
```

``` js
document.getElementById('windowOpenLinkNoopener').addEventListener('click', function() {
  window.open('https://html.spec.whatwg.org/multipage/semantics.html#link-type-noopener', '', 'noopener');
});

document.getElementById('windowOpenLink').addEventListener('click', function() {
  window.open('https://html.spec.whatwg.org/multipage/semantics.html#link-type-noopener', '', '');
});
```

What is the expected behavior?
The tab should open in a new window.

What went wrong?
Instead, the tab opens as a popup modal, whenever anything is added to the third parameter of `window.open`.

Did this work before? No 

Chrome version: 49.0.2623.87  Channel: stable
OS Version: 15.10
Flash Version: Shockwave Flash 21.0 r0

As you can see in the sample, the anchor element with `rel=noopener` applied to it simply opens the url in a new tab, as is expected.
 
Components: -Blink Blink>WindowDialog
Cc: rnimmagadda@chromium.org
Labels: M-50
Status: Untriaged (was: Unconfirmed)
Able to repro this issue on Windows 7, MAC (10.11.3) & Ubuntu Trusty (14.04) for Google Chrome Stable Version - 49.0.2623.87 

This is a Non-Regression issue existing from M30 - # - 30.0.1549.0
Labels: OS-Mac OS-Windows

Comment 4 by chem...@gmail.com, Aug 17 2017

This bug basically prevents me from being able to use "noopener" because I really don't want model popup windows. I want.. no I *need* a tab :)

Any news on this? It's been >= year..

Comment 5 by chem...@gmail.com, Aug 30 2017

Checking back in after being reminded of this issue. I created a codepen example that illustrates the problem:

https://codepen.io/rejh/pen/WEYmpz

Hope this helps getting this back on the radar. Replacing all window.open() calls with <a> is not always an option.
Cc: mkwst@chromium.org
@mkwst: does this warrant higher priority as it causes devs to avoid a security benefit?

Comment 7 by mkwst@chromium.org, Aug 31 2017

Cc: creis@chromium.org dcheng@chromium.org
Labels: -M-50 -Pri-2 M-63 OS-Android OS-Chrome Pri-1
Status: Available (was: Untriaged)
`window.open` kinda falls between some cracks in our triage structure (is "WindowDialog" even the right component?). :/ Since 62 is branching today, let's try to get this fixed for 63.

I'm about to be OOO for a week, but perhaps creis@ and/or dcheng@ might be able to find someone to poke at this? I imagine we'd be able to come up with reasonable behavior.

Comment 8 by ojan@chromium.org, Jun 15 2018

Cc: -creis@chromium.org
Owner: creis@chromium.org
Just stumbled across it as I hit this bug and went to file it. If this is really a P1 it should probably have an owner. :)

Comment 9 by chem...@gmail.com, Jun 15 2018

👍 thanks ;)

Comment 10 by creis@chromium.org, Jun 20 2018

Cc: creis@chromium.org
Components: UI>Browser>Navigation
Owner: ----
Sorry, our team really has zero cycles for this right now, though I agree it's a bug that should be fixed.  I agree with Mike that this falls into a relatively unowned area, so I don't know who to recommend to work on it.  Maybe someone else in the Navigation component can volunteer?

Marking available, since it will just sit in my queue otherwise.

Comment 11 by nasko@chromium.org, Jun 20 2018

Cc: nasko@chromium.org
Unsurprisingly, this also affects noreferrer
Any news? It's been a while ;)
Can we nudge this please? I hear you at #10 that you have no cycles, but I'm hoping this could be a relatively quick win if we can figure out the best team to look at it.
Cc: alex...@chromium.org
I think it's actually possible to make window.open() with noopener to open a new tab instead of a popup, if you specify the right things in the third parameter.  For your codepen example, this seems to do it:
  window.open('https://html.spec.whatwg.org/multipage/semantics.html#link-type-noopener','_blank','toolbar=1,menubar=1,location=1,status=1,scrollbars=1,noopener');

(Credit to dcheng@, who gave this tip to me a while ago.)  We should still look into changing the default behavior, which I agree isn't ideal, but at least this might be a workaround in the meantime.

@ #15 & dcheng@ - thanks for the workaround. Be good to get this an owner soon.
@c#14: heh that seems to work. Thanks!

Also looking forward for Chrome doing this by default :)

Sign in to add a comment