Chrome popup blocking multiple urls opened at the same time |
|
Issue description
This is probably working as intended, but did popup blocking get more restrictive in the last release or two?
For example, running this JS will only open the first window, and the second window will be blocked (depending on the site you execute the JS on), and Chrome silently shows a tiny popup blocked icon.
Basically, we have a feature that opens a list of links each in a new tab, and users have started complaining within the last week that it doesn't work any more. Maybe before it was more obvious that a popup was blocked?
// Prevent referrer leaking
openUrl = function(url, target) {
newWin = window.open('', target, '');
if (newWin) {
newWin.opener = null;
var html = '<meta name="referrer" content="no-referrer"><meta http-equiv="refresh" content="0; url=' + url + '">';
newWin.document.write(html);
newWin.document.close();
}
}
newWindow = function(url) {
openUrl(url, Math.random()+'');
}
newWindow('https://www.google.com');
newWindow('https://www.yahoo.com'); // this doesn't open
// You could also just use window.open and it'd still be blocked, but when you do it this way (to prevent referrer leaking) it shows about:blank in the popup blocked list and clicking on it just opens a blank tab.
For reference, I'm on 63.0.3239.132 Linux.
,
Jan 16 2018
I just went back and tested it on a random build in Chrome 54 and I could still repro. My repro file is just calling your "newWindow" function twice in the document's click handler. So I'm a bit stumped on what the actual issue or change is.
,
Jan 16 2018
What about this: 1. Open this sheet https://docs.google.com/spreadsheets/d/1xMAQh5mlF12aEhAh4uZNx41PAzSA6U8fDTFNhgIMFxg/edit#gid=0 2. Click and drag to select cells C2 and C3 3. Right click and select "Open all links", and see if that works in old Chrome?
,
Jan 16 2018
Yeah I just tested using the same M54 build and only one popup goes through.
,
Jan 21 2018
I can't think of anything that would have changed here in 63. |
|
►
Sign in to add a comment |
|
Comment 1 by csharrison@chromium.org
, Jan 16 2018Components: UI>Browser>PopupBlocker