New issue
Advanced search Search tips

Issue 880172 link

Starred by 1 user

Issue metadata

Status: Untriaged
Owner: ----
Components:
EstimatedDays: ----
NextAction: ----
OS: Mac
Pri: 2
Type: Bug



Sign in to add a comment

Chrome/Chromium not jumping to the correct tab on window.focus() with multiple windows open on multiple screens

Reported by trouse...@gmail.com, Sep 4

Issue description

UserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3542.0 Safari/537.36

Steps to reproduce the problem:
1. Make sure you have 2(or more) screens
2. Open 2 chromium windows on 2 screens and maximise both of them
3. Open a few tabs on each maximised window
4. Open WhatsApp Web(or anything at all that sends notifications and does a window.focus() on clicking the notification) on one of the window, login and allow notifications. Now there is one chromium window with WhatsApp and the other without.
5. Switch to another tab in the chromium window containing WhatsApp Web
6. Switch to the screen containing the chromium window with WhatsApp to another desktop
7. Switch to any tab in the chromium window without WhatsApp
8. Switch focus to some other App that's not chromium. Now you should have two chromium windows opened fullscreen, both invisible. Your last tab focused should be in the window without WhatsApp.
9. Ask a friend of you to send you an message on WhatsApp
10. You should get a notification, click on it.
11. The focus is brought to the last window focused, which is not WhatsApp.

What is the expected behavior?
The browser should focus on the tab from where the window.focus() is fired.

What went wrong?
I don't know as I am not familiar with Chromium's codebase, but my guess is that when switching windows after window.focus() from outside chromium, the case with multiple desktops on different screens is not considered.

Did this work before? N/A 

Does this work in other browsers? Yes

Chrome version: 71.0.3542.0  Channel: dev
OS Version: OS X 10.13.6
Flash Version: 

The same case works fine on Safari 11.1.2 (13605.3.8) and Firefox 63.0b2 on Mac.
 
Components: UI>Browser>Core Blink>HTML>Focus
Status: Untriaged (was: Unconfirmed)
I think I can confirm this on Windows 10 (1709) as well. I did not notice whether any Chrome window/tab got the focus or none did, but the WhatsApp tab definitely did not show up when I clicked on its notification. It happens occasionally (about once a day), though I do not get a lot of messages anyway.
Components: -Blink>DOM -Blink>HTML>Focus Blink>WindowDialog

Sign in to add a comment