New issue
Advanced search Search tips

Issue 843257 link

Starred by 2 users

Issue metadata

Status: Untriaged
Owner: ----
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

ctrl+click hits the popup blocker

Project Member Reported by ojan@chromium.org, May 15 2018

Issue description

What steps will reproduce the problem?
(1) Go to https://theatlantic.com/business/archive/2018/05/chinas-silicon-valley/559871/
(2) ctrl+click one of the links in the article --> popup blocker gets invoked
(3) ctrl+click that same link again --> tab is opened in the background

Hard to be sure, but this seems likely a bug in our user gesture handling.

This was on Mozilla/5.0 (X11; CrOS x86_64 10452.85.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/66.0.3359.158 Safari/537.36

 
Components: UI>Browser>PopupBlocker
Ojan, do you know if this is a recent regression?

Comment 2 by ojan@chromium.org, May 15 2018

I don't know. Just stumbled across it. I feel like I've seen this before though.
Just repro'd on Chrome 54 on MacOS, so I don't think it's a regression.
I did not repro with UAv2 though, so I'm guessing mustaq has fixed this already :)

Comment 4 by ojan@chromium.org, May 15 2018

Might be a good argument mustaq can use for why the old gesture logic needs to change (i.e. it's hard for developers to get right).

Comment 5 by ojan@chromium.org, May 15 2018

Although, I'm confused why the popup blocker is even involved with ctrl+click of a link...unless maybe the site is capturing the click and dispatching their own window.open?

Comment 6 by mustaq@chromium.org, May 15 2018

Two observations:
- On every link the second ctrl-click works.
- First ctrl-click on link1 then second on link2 doesn't work.
- The link in www.example.com doesn't repro this bug.

Btw, seems unrelated to site isolation, repros on my test Surface.

ojan: Yeah usually in these cases the site is intercepting the click and dispatching window.open later.

Comment 8 by mustaq@chromium.org, May 15 2018

Not a site problem:
- Works perfectly in Firefox and Edge (hopefully no UA sniffing).
- Ctrl-clicks doesn't go through create_window.cc (unlike window.open() at console).

Comment 9 by mustaq@chromium.org, May 15 2018

Enabling UAv2 fixes the popup blocker problem but the new tab still gets focus (unlike Edge/FF).

Charlie, does ctrl-click consume activation?  Or is it supposed to?  I can recall seeing a code that a renderer skips sending focus request to browser if there is no user activation.  This bug could have some link to it.


ctrl-click consumes activation in M67+, so I don't think that's what is happening here.

I think the site is spoofing a ctrl-click, via a simulated mouse event.

Sign in to add a comment