Closing an opened window with window.close doesn't work for Chrome webstore URLs
Reported by
jo...@lookback.io,
Aug 27
|
|||||
Issue descriptionUserAgent: 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?
,
Aug 31
,
Aug 31
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).
,
Sep 1
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.
,
Sep 3
,
Sep 4
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 |
|||||
Comment 1 by susan.boorgula@chromium.org
, Aug 27