New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 729495 link

Starred by 3 users

Issue metadata

Status: Verified
Owner:
Closed: Jul 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Windows , Chrome , Mac
Pri: 1
Type: Bug
Team-Security-UX

Blocked on:
issue 752630



Sign in to add a comment

Permission prompts should not activate or focus window

Project Member Reported by benwells@chromium.org, Jun 5 2017

Issue description

1. Navigate to benfredwells.github.io
2. Hit 'Read location delayed'
3. Open another window on top of the first

What happens: The first window pops over the second
What should happen: The first window should stay focused and activated.
 
Can we fold addressing  Issue 719016  into this as well?

Also, I think you mean...

What should happen: the second window should stay focused and activated
Yep, that's indeed what I meant. I've added a comment on the other bug about this one ... I think the other one is a bit more general and might cover more things.
Project Member

Comment 3 by bugdroid1@chromium.org, Jun 22 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/43c4d230102a42febaa1e2102d075426c1141a55

commit 43c4d230102a42febaa1e2102d075426c1141a55
Author: timloh <timloh@chromium.org>
Date: Thu Jun 22 03:53:20 2017

Permission prompts shouldn't cause browser to be focused

BUG= 729495 

Review-Url: https://codereview.chromium.org/2925773002
Cr-Commit-Position: refs/heads/master@{#481430}

[modify] https://crrev.com/43c4d230102a42febaa1e2102d075426c1141a55/chrome/browser/ui/views/permission_bubble/permission_prompt_impl.cc

Comment 4 by timloh@chromium.org, Jun 22 2017

Labels: ReleaseBlock-Stable M-60
I think we should merge this to Beta, since this is being actively exploited to create pop-unders, but I'll verify the fix on canary before requesting merge permission.

Comment 5 by timloh@chromium.org, Jun 27 2017

Labels: Merge-Request-60
I verified that the issue is resolved on Windows Canary.

Requesting merge to M60 Beta. Websites seem to be creating tens of millions of pop-unders a day with this :(
Project Member

Comment 6 by sheriffbot@chromium.org, Jun 27 2017

Labels: -Merge-Request-60 Hotlist-Merge-Review Merge-Review-60
This bug requires manual review: M60 has already been promoted to the beta branch, so this requires manual review
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
Cc: pnangunoori@chromium.org
Labels: Needs-Feedback
Tested on Dev # 61.0.3141.0 by following the below steps. But the behavior seems to be same from the earlier builds too. Screencast of the steps followed is attached.

Steps followed are:
1. Launch Chrome.
2. Navigate to the URL - benfredwells.github.io.
3. Click on the button 'Get Location Delayed'.
4. Notice a pop-up to allow location.
5. Open a new Window by tapping the keys Ctrl+N or Wrench Menu >> New Window
6. Focus will be on the new Window.

Observation: Even after tapping on 'Allow' button in the pop-up observed in Step-4, behavior is same.

Could you please let us know if the steps followed are correct. Could you please correct us if there is any difference in the steps followed.

Thanks in advance.
729495.mp4
961 KB View Download
Cc: gov...@chromium.org
M61 Dev release is postponed until Thursday, so if the change was just in Canary, then we may not see it until Thursday. 
timloh@ - is the change well tested, safe merge overall?
re comment 7: The new window should be opened quickly, before the location prompt appears.

re comment 9: The merge should be safe, it's a very small change with simple logic. The change itself is unfortunately hard to automatically test but I manually verified it works as intended, including checking sites that are abusing this.
Labels: -Merge-Review-60 Merge-Approved-60
Approving merge to M60 based on comment 10. Branch: 3112.
Project Member

Comment 12 by bugdroid1@chromium.org, Jul 3 2017

Labels: -merge-approved-60 merge-merged-3112
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/d4fc7bc680b1696843e9f2c5c27f12c34a559049

commit d4fc7bc680b1696843e9f2c5c27f12c34a559049
Author: Timothy Loh <timloh@chromium.org>
Date: Mon Jul 03 04:33:31 2017

Permission prompts shouldn't cause browser to be focused

BUG= 729495 
TBR=timloh@chromium.org

(cherry picked from commit 43c4d230102a42febaa1e2102d075426c1141a55)

Review-Url: https://codereview.chromium.org/2925773002
Cr-Original-Commit-Position: refs/heads/master@{#481430}
Change-Id: Ic9b55e43fd111b0b1a963d4b38d99c5072e5180d
Reviewed-on: https://chromium-review.googlesource.com/558331
Reviewed-by: Timothy Loh <timloh@chromium.org>
Cr-Commit-Position: refs/branch-heads/3112@{#507}
Cr-Branched-From: b6460e24cf59f429d69de255538d0fc7a425ccf9-refs/heads/master@{#474897}
[modify] https://crrev.com/d4fc7bc680b1696843e9f2c5c27f12c34a559049/chrome/browser/ui/views/permission_bubble/permission_prompt_impl.cc

Comment 13 Deleted

Cc: kavvaru@chromium.org
Tested the issue on windows 7, Mac 10.12.6 using chrome version 60.0.3112.66 with the below steps

1. Go to URL benfredwells.github.io
2. Clicked on "Get Location Delayed"
3. Immediately opened new windows using ctrl+N or Cmd+N before the popup appears
Here observed different behaviour on both OS.

Windows :: On windows observed that the the focus is there on second window.
Mac :: On mac the window comes to front as soon as the popup appears and stay focused.

Observed the same behaviour on earlier chrome versions 61.0.3136.0 & 60.0.3111.0 before the fix landed.
timloh@ Please find the attached screen casts of both OS behaviour and confirm if anything missed from our end.

Thanks,
729495_Windows.mp4
846 KB View Download
729495_Mac.mp4
502 KB View Download
Looks fine. Mac currently uses a separate code-path to desktop so it isn't fixed there but bug 740827 will address that.
typo: separate code-path to other desktop platforms*
If this is fixed, do you mind closing the bug (marking it as Fixed)?
Status: Fixed (was: Assigned)
Closing as fixed (but note comment 15)
Status: Verified (was: Fixed)
Verified on ChromeOS 9592.71.0, 60.0.3112.80 as per c#10 (The new window should be opened quickly, before the location prompt appears.)

Comment 20 Deleted

Comment 21 by a...@chromium.org, Aug 5 2017

Blockedon: 752630

Comment 22 by a...@chromium.org, Aug 5 2017

Deleted my comment; you linked to the permissions bubble going MacViews. Apparently that's in M62.

Which leaves an unfortunate gap, from M60-62 where the Views versions are immune but the Mac version isn't.

Sign in to add a comment