window.open opens in new tab with location=yes
Reported by
ahthegir...@googlemail.com,
May 17 2017
|
|||||||||||||
Issue description
UserAgent: Mozilla/5.0 (Windows NT 6.3; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/59.0.3071.47 Safari/537.36
Example URL:
Steps to reproduce the problem:
1. Run window.open("http://www.google.com", "", "height=500px,width=500px,location=yes") in console.
2. Run window.open("http://www.google.com", "", "height=500px,width=500px,location=no")
What is the expected behavior?
Window 1 and 2 should both open as a popup.
What went wrong?
Window 1 opens as a new tab.
Window 2 opens correctly as a popup.
Does it occur on multiple sites: N/A
Is it a problem with a plugin? No
Did this work before? Yes Working on stable (58)
Does this work in other browsers? Yes
Chrome version: 59.0.3071.47 Channel: beta
OS Version: 6.3
Flash Version:
,
May 18 2017
Able to reproduce on Windows-10, Ubuntu 14.04 and Mac OS 10.12 using chrome beta M59-59.0.3071.47. Bisect Information: ===================== Good build: 59.0.3050.0 Bad Build : 59.0.3051.1 Change Log URL: https://chromium.googlesource.com/chromium/src/+log/936e728a2bef7552fb07018d7075a5e996332bea..e507bb334d3c66917eec47fbc476ed0a7d62f33f From the above change log suspecting below change Review URL: https://codereview.chromium.org/2773573002 dcheng@ - Could you please check whether this is caused with respect to your change, if not please help us in assigning it to the right owner. Thanks!
,
Jun 15 2017
One more bug which is related to window.open issue: https://bugs.chromium.org/p/chromium/issues/detail?id=732784
,
Jun 26 2017
This also seems to break Firebase's authentication using a popup: https://github.com/firebase/firebase-js-sdk/issues/63
,
Jun 29 2017
Confirmed. Interoperability issue. http://output.jsbin.com/wuwazigole/1 Click anywhere on that page. Every desktop browser except Chrome 59+ and Opera 46+ opens a popup window. Desktop Chrome 59+ and Opera 46+ open a new tab. From issue 732784 comment 15, it seems like it is possible to create a new window, which I think is not intentional and may be a bug - window.open("somepage.aspx", "_blank", "toolbar=1,location=1,menubar=1,scrollbars=1,resizable=1"); <-- new tab window.open("somepage.aspx", "_blank", "toolbar=1,location=0,menubar=1,scrollbars=1,resizable=1"); <-- *still* a new tab window.open("somepage.aspx", "_blank", "toolbar=0,location=0,menubar=1,scrollbars=1,resizable=1"); <-- finally, a new window
,
Jun 29 2017
All of the example here (yuck) - https://www.w3schools.com/jsref/met_win_open.asp Open a new tab. I think at least some of them are supposed to open a popup.
,
Jun 29 2017
I also can confirm that this issue has reared its head in our member facing web site. We did not have this issue with Chrome 58, but when some of our members updated to Chrome 59.0.3071.115 this morning, our window.open with location=1 or location=yes code is now opening in a new tab instead of the desired new window/single tab (as it did in Chrome < 59). It looks like this has affected Facebook too: https://stackoverflow.com/questions/44417724/facebook-authentication-opening-tab-instead-of-popup-in-chrome-59 Here is another one: https://superuser.com/questions/1223168/how-can-chrome-59-0-3071-115-be-configured-to-not-open-a-popup-as-a-new-tab What is especially annoying is that in IE 11, if you remove location=yes, the address bar is removed in the new window (as you would expect it to), but in Chrome the new window is opened with the address bar intact. I want the address bar to be present, and I don’t want to have to hack up my JS to work around this bug. In addition, toolbar=1 and toolbar=yes, impacts the new window vs. new tab behavior. window.open("somepage.aspx", "_blank", "toolbar=1,location=1,menubar=1,scrollbars=1,resizable=1"); <-- new tab window.open("somepage.aspx", "_blank", "toolbar=1,location=0,menubar=1,scrollbars=1,resizable=1"); <-- *still* a new tab window.open("somepage.aspx", "_blank", "toolbar=0,location=0,menubar=1,scrollbars=1,resizable=1"); <-- finally, a new window Please note that the 3 statements above opened a new window (and not a new tab) in Chrome < 59.
,
Jul 10 2017
dcheng: It sounds like your change caused a significant regression for a number of sites and a new interop issue (unfortunately I missed that I Was cc'd in issue 82522 while there was still time to change our mind before M60 ship). Perhaps we should revert while we debate the right path (eg. on an intent thread with data from other browsers and web-platform-test)? Marking RBS M60 to track making an intentional decision here.
,
Jul 10 2017
,
Jul 10 2017
s/before M60 ship/before M59 ship/. At this point probably all we can do is consider undoing the change for M60 and exploring other options going forward...
,
Jul 12 2017
,
Jul 12 2017
,
Jul 17 2017
Any updates? M60 is going to Stable next week.
,
Jul 18 2017
Also effects paypal in-flow payments. The location is important for in-flow auth and payments to confirm you are going via the actual official 3rd party site (e.g. Paypal, Facebook, etc) rather than a phishing look-a-like
,
Jul 18 2017
Sorry, I missed this bug until today... So it's a bug that location=yes/location=no is controlling tab vs popup behavior at all: the original intent is that this should purely be gated by toolbar. I don't actually understand why this is happening in the original code (though it's pretty straightforward why it happens in the new code: we explicitly map the location and toolbar features to the same boolean flag...) While I would personally prefer to just fix that--it's weird that we conflate the toolbar and location bits internally--the timeline is too short at this point (and Mozilla has expressed concerns about the toolbar feature controlling whether or not something opens as a popup). Unfortunately, the original patch doesn't revert cleanly at ToT (due to the Blink rename), so it will have to be a manual revert.
,
Jul 18 2017
https://chromium-review.googlesource.com/c/575122 is the manual revert.
,
Jul 19 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/122bd4bcd53fa246f8c9dfd1b0543b626c3338d3 commit 122bd4bcd53fa246f8c9dfd1b0543b626c3338d3 Author: Daniel Cheng <dcheng@chromium.org> Date: Wed Jul 19 00:17:04 2017 Manually revert window.open() should gate new tab/new popup based on toolbar visibility. > Previously, Chrome required that toolbar, menubar, scrollbars, status, > resizable were all set to enabled to open a window as a new tab rather > than a new popup. However, this causes developer frustration if one of > window features is accidentally omitted (as it then defaults to > disabled). > > Instead, just use toolbar visibility to determine whether or not > window.open() creates a new popup or a new tab, which matches Firefox. > > BUG=82522 > Review-Url: https://codereview.chromium.org/2773573002 > Cr-Commit-Position: refs/heads/master@{#459540} > Committed: https://chromium.googlesource.com/chromium/src/+/e507bb334d3c66917eec47fbc476ed0a7d62f33f Bug: 723655 Change-Id: Ia9199be56cab9b5bc6f758081677e8328562fc54 Reviewed-on: https://chromium-review.googlesource.com/575122 Reviewed-by: Nate Chapin <japhet@chromium.org> Commit-Queue: Daniel Cheng <dcheng@chromium.org> Cr-Commit-Position: refs/heads/master@{#487681} [delete] https://crrev.com/d9680cb31e92b038b14f41c6f462341d16c9c321/third_party/WebKit/LayoutTests/fast/dom/Window/open-as-popup-vs-tab.html [modify] https://crrev.com/122bd4bcd53fa246f8c9dfd1b0543b626c3338d3/third_party/WebKit/Source/core/page/CreateWindow.cpp [modify] https://crrev.com/122bd4bcd53fa246f8c9dfd1b0543b626c3338d3/third_party/WebKit/Source/core/page/CreateWindow.h [modify] https://crrev.com/122bd4bcd53fa246f8c9dfd1b0543b626c3338d3/third_party/WebKit/Source/core/page/EffectiveNavigationPolicyTest.cpp [modify] https://crrev.com/122bd4bcd53fa246f8c9dfd1b0543b626c3338d3/third_party/WebKit/public/web/WebWindowFeatures.h
,
Jul 19 2017
,
Jul 19 2017
This bug requires manual review: We are only 5 days from stable. Please contact the milestone owner if you have questions. Owners: amineer@(Android), cmasso@(iOS), josafat@(ChromeOS), bustamante@(Desktop) For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
,
Jul 19 2017
bustamante@ for M60-Merge Review.
,
Jul 20 2017
This change meets the bar and is approved for M60 (build 3112)
,
Jul 20 2017
Hmm... so upon further inspection, I think it would be easier to revert e507bb334d3c66917eec47fbc476ed0a7d62f33f off the branch. I had my milestone dates wrong, so cherry-picking this to M60 will be harder than I thought. bustamente@ are you OK with this? There are some naming conflicts to resolve, but they are straightforward (and a result of the Blink rename).
,
Jul 24 2017
This issue has been approved for a merge. Please merge the fix to any appropriate branches as soon as possible! If all merges have been completed, please remove any remaining Merge-Approved labels from this issue. Thanks for your time! To disable nags, add the Disable-Nags label. For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
,
Jul 24 2017
Re #22 yeah that sounds fine to me if you think you can do the revert safely.
,
Jul 26 2017
I updated on the stable channel today and it appears this fix did not make it into the stable channel update (Chrome 60.0.3112.78) yesterday.
,
Jul 26 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/8825451c009c4d8615de8a1dfc784ae196d0492e commit 8825451c009c4d8615de8a1dfc784ae196d0492e Author: Daniel Cheng <dcheng@chromium.org> Date: Wed Jul 26 22:54:11 2017 Revert "window.open() should gate new tab/new popup based on toolbar visibility." This reverts commit e507bb334d3c66917eec47fbc476ed0a7d62f33f. Bug: 723655 Change-Id: I4d13c7899d215d9d0d7e6d4866b50a337af5b1b4 Reviewed-on: https://chromium-review.googlesource.com/587997 Reviewed-by: Nate Chapin <japhet@chromium.org> Cr-Commit-Position: refs/branch-heads/3112@{#677} Cr-Branched-From: b6460e24cf59f429d69de255538d0fc7a425ccf9-refs/heads/master@{#474897} [delete] https://crrev.com/579d425199727402fbcf4041ce62488a35939eda/third_party/WebKit/LayoutTests/fast/dom/Window/open-as-popup-vs-tab.html [modify] https://crrev.com/8825451c009c4d8615de8a1dfc784ae196d0492e/third_party/WebKit/Source/web/ChromeClientImpl.cpp [modify] https://crrev.com/8825451c009c4d8615de8a1dfc784ae196d0492e/third_party/WebKit/Source/web/tests/ChromeClientImplTest.cpp
,
Jul 27 2017
Issue 749078 has been merged into this issue.
,
Jul 28 2017
Hello DCheng I have verified this issue in Version 60.0.3112.78 and seems not fixed. Please let me know it has been addressed.
,
Jul 28 2017
#28 - correct, it is not included in that version. It is included in 60.0.3112.80 and later. Note - since it was landed too late in the stable release cycle, there is no guarantee it will ever be released as a stable patch, so you might only get the fix in Chrome 61.
,
Aug 2 2017
Verified this issue on Windows-7, Ubuntu 14.04 and Mac OS 10.12.6 using chrome latest stable #60.0.3112.90 by following steps mentioned in the original comment. Observed Windows 1 and 2 opens as popup. As per fix in comment #26 confirming this issue got resolved and adding TE-Verified label for M-61. Thanks!
,
Aug 2 2017
#30 - as far as I can tell 60.0.3112.78 is the latest stable, not 60.0.3112.90
,
Aug 3 2017
#31 - it was just released - https://chromereleases.googleblog.com/2017/08/stable-channel-update-for-desktop.html
,
Aug 3 2017
I just got the latest version of Chrome, 60.0.3112.90, and the window.open function with toolbar=yes, is working as expected. Opening a new popup. Thanks for fixing the issue.
,
Aug 4 2017
#32 - Thanks for the update. Just grabbed the latest stable and can verify the fix is functional for Windows 7 64-bit |
|||||||||||||
►
Sign in to add a comment |
|||||||||||||
Comment 1 by nyerramilli@chromium.org
, May 18 2017