New issue
Advanced search Search tips

Issue 877903 link

Starred by 2 users

Issue metadata

Status: Untriaged
Owner: ----
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Windows , Mac
Pri: 2
Type: Bug



Sign in to add a comment

Closing an opened window with window.close doesn't work for Chrome webstore URLs

Reported by jo...@lookback.io, Aug 27

Issue description

UserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/68.0.3440.106 Safari/537.36

Steps to reproduce the problem:
1. Attach a click event listener to a DOM element, and make it open a new window with `window.open` with the URL `https://chrome.google.com/webstore`. Save a reference in a variable.
2. Later, call the `close()` method on that saved window reference.

Code sample:

```
<a href="#" id="store">Open Chrome web store</a>
```

```
document.querySelector('#store').addEventListener('click', (evt) => {
   evt.preventDefault();
   let windowRef = window.open('https://chrome.google.com/webstore', '_blank');

   setTimeout(() => {
      windowRef && windowRef.close(); // The tab doesn't close here
   }, 2000);
});
```

What is the expected behavior?
The opened Chrome webstore tab/window should close.

What went wrong?
The tab/window does not close in Chrome.

No error messages are printed in the console, even with verbose logging levels.

Did this work before? N/A 

Does this work in other browsers? Yes

Chrome version: 68.0.3440.106  Channel: stable
OS Version: OS X 10.13.2
Flash Version: 

See attached .html test case. The test case runs in

* Firefox 61
* Safari 11

It seems URLs on the format `https://chrome.google.com/webstore` are treated differently in Chrome?
 
chrome-bug-repro.html
1.2 KB View Download
Labels: Needs-Triage-M68
Components: Blink
Components: Platform>Apps>Default Internals>Core Webstore
I believe the web store is always launched in a special, separate renderer process, so you cannot actually interface with it other than sending it messages perhaps (postMessage).
Yes, that's what me and a colleague believe too – that the web store is a Chrome browser specific thing, and not a regular web page process.

Nevertheless, it doesn't feel like expected behaviour when it breaks in this kind of way.
Components: -Blink Blink>WindowDialog
Cc: vamshi.kommuri@chromium.org
Labels: Triaged-ET Target-71 M-71 FoundIn-71 OS-Linux OS-Windows
Status: Untriaged (was: Unconfirmed)
Able to reproduce the issue on reported chrome version 68.0.3440.106 and on the latest canary 71.0.3541.0 using Mac 10.13.1, Windows 10 and Ubuntu 14.04.

Similar behaviour is seen from M60(60.0.3112.0) hence considering it as Non-Regression and marking it as untriaged.

Thanks!

Sign in to add a comment