Chrome Version: 57.0.2936.0
OS: Windows, OSX
What steps will reproduce the problem?
(1) open two windows and/or two tabs
(2) open goto.google.com/dtjs on one of the windows/tabs
(3) click "Try it" from the page
(4) immediately move focus to another window/tab to make the page in 3 non-foremost
(5) a few seconds later, the tab with 3 is auto focused
(6) when clicked another tab, the dialog is auto-dismissed, and a second later the tab with 3 is auto focused again (this will be repeated for 8 times with the test page). Auto-focusing happens for both a hidden-tab and a visible but not foremost tab.
What is the expected result?
Dialogs on the non-foremost tab should be auto dismissed according to the doc "[Non-Foremost Tabs
] For confirm and prompt dialogs, we would immediately return false/null to prevent the JavaScript from blocking".
What happens instead?
Both on a hidden-tab and on a non-foremost&visible tab, js dialogs open and also are auto-focused.
Screen recordings:
https://drive.google.com/open?id=0B63LqjsMmAX_ZWh0bXB0dGZWdVE
https://drive.google.com/open?id=0B63LqjsMmAX_MWJueGI4YmlFVTA
https://drive.google.com/open?id=0B63LqjsMmAX_SVVqLWJMWTlDVTQ
Comment 1 by erikc...@chromium.org
, Dec 9 2016