New issue
Advanced search Search tips

Issue 661250 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Mar 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Mac
Pri: 1
Type: Bug-Regression



Sign in to add a comment

New window opened from notification doesn't focus app

Project Member Reported by sdy@chromium.org, Nov 1 2016

Issue description

Version: 56.0.2906.0
OS: macOS

What steps will reproduce the problem?
(1) Visit any site with notification permissions.
(2) Run this in the console: (new Notification('Click me')).onclick = () => { window.open('', '', 'width=100,height=100').focus(); }
(3) Focus another app (not Chrome)
(4) Click the notification.

What is the expected output?
The new window comes to the front.

What do you see instead?
A new window, but Chrome doesn't come to the front.

Bisected to crrev.com/629a5d065848adbac50931ae305a3d8597578e4d.
 

Comment 1 by sdy@chromium.org, Feb 23 2017

Labels: M-58

Comment 3 by sdy@chromium.org, Mar 10 2017

Status: Fixed (was: Assigned)

Comment 4 by sdy@chromium.org, Mar 10 2017

Labels: Merge-Request-58
Project Member

Comment 5 by sheriffbot@chromium.org, Mar 10 2017

Labels: -Merge-Request-58 Hotlist-Merge-Approved Merge-Approved-58
Your change meets the bar and is auto-approved for M58. Please go ahead and merge the CL to branch 3029 manually. Please contact milestone owner if you have questions.
Owners: amineer@(clank), cmasso@(bling), bhthompson@(cros), govind@(desktop)

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Project Member

Comment 6 by bugdroid1@chromium.org, Mar 10 2017

Labels: -merge-approved-58 merge-merged-3029
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/a6eafb8f9e388d062c5dcbf32524e9492392ef7d

commit a6eafb8f9e388d062c5dcbf32524e9492392ef7d
Author: Sidney San Martín <sdy@chromium.org>
Date: Fri Mar 10 23:51:02 2017

When navigation focuses a web contents, also activate its window.

This fixes an issue where a popup opened by clicking a notification doesn't
activate Chrome (and appears behind the active app) on Mac.

BUG= 661250 

Review-Url: https://codereview.chromium.org/2729613006
Cr-Commit-Position: refs/heads/master@{#455632}
(cherry picked from commit 6589abd5285d3008c44143269bdf5dc2605028cf)

Review-Url: https://codereview.chromium.org/2747563002 .
Cr-Commit-Position: refs/branch-heads/3029@{#128}
Cr-Branched-From: 939b32ee5ba05c396eef3fd992822fcca9a2e262-refs/heads/master@{#454471}

[modify] https://crrev.com/a6eafb8f9e388d062c5dcbf32524e9492392ef7d/chrome/browser/notifications/notification_interactive_uitest.cc
[add] https://crrev.com/a6eafb8f9e388d062c5dcbf32524e9492392ef7d/chrome/browser/notifications/notification_interactive_uitest_mac.mm
[add] https://crrev.com/a6eafb8f9e388d062c5dcbf32524e9492392ef7d/chrome/browser/notifications/notification_interactive_uitest_support.cc
[add] https://crrev.com/a6eafb8f9e388d062c5dcbf32524e9492392ef7d/chrome/browser/notifications/notification_interactive_uitest_support.h
[modify] https://crrev.com/a6eafb8f9e388d062c5dcbf32524e9492392ef7d/chrome/browser/ui/browser_navigator.cc
[modify] https://crrev.com/a6eafb8f9e388d062c5dcbf32524e9492392ef7d/chrome/test/BUILD.gn
[modify] https://crrev.com/a6eafb8f9e388d062c5dcbf32524e9492392ef7d/chrome/test/data/notifications/notification_tester.html

Labels: TE-Verified-M58 TE-Verified-58.0.3029.19
Tested this issue on Mac 10.12.3 using chrome version#58.0.3029.19 with the steps mentioned in comment #0.Observed that the new chrome window opened front upon clicking notification. Hence adding TE-Verified labels.
Please find the attached screen cast for the same.
Thanks!!
661250.mp4
1.2 MB View Download

Comment 8 by sdy@chromium.org, Mar 14 2017

Thanks for verifying!

Sign in to add a comment