New issue
Advanced search Search tips

Issue 726688 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner: ----
Closed: Jun 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Windows
Pri: 3
Type: Bug



Sign in to add a comment

Discard dialogs in loop when tab loses focus and prevent gaining focus back

Project Member Reported by ha...@opera.com, May 26 2017

Issue description

Chrome Version: 60.0.3109.0

OS: Win7

The case of infinite dialogs spawned by JS was wontfixed in  issue 718281 . The rationale is understandable but there is some mismatch in the behaviour. 
While in the normal case the dialog would be auto-dismissed when the current tab loses focus, in this case it doesn't happen. Also even after switching tabs, the tab with the dialog is able to bring focus back. This can be troublesome and confusing. Probably such dialogs can be discarded when the tab loses focus?
 

Comment 1 by a...@chromium.org, May 26 2017

Components: Blink>WindowDialog
> While in the normal case the dialog would be auto-dismissed when the current tab loses focus, in this case it doesn't happen.

If auto-dismissal of a dialog isn't happening when tabs are being switched, please provide repro steps. (Unless what you mean is that the tab issuing the dialog just fires off another dialog to regain focus.)

> Also even after switching tabs, the tab with the dialog is able to bring focus back. This can be troublesome and confusing. Probably such dialogs can be discarded when the tab loses focus?

Your concern is that even though alerts are auto-dismissing, the page can just issue another one, and another one, and another one, to force the user back to the tab?

What I want to do is remove the ability for a page to force its own activation by using an alert() or confirm(). (I already removed that ability for prompt().) That is something that I'll need to do an Intent for, and I anticipate a bit of a fight. Discarding these alerts will be contentious.

Comment 2 by ha...@opera.com, May 26 2017

> If auto-dismissal of a dialog isn't happening ..
It is the latter, the page triggers more dialogs preventing even switching to a different tab.

If the page is not able to gain focus back by issuing another dialog that works too.

Comment 3 by a...@chromium.org, May 26 2017

So auto-dismissal works, but the page is responding to the dismissal by issuing a new dialog.

The answer right now it to just close such a page. That should work.

The future answer is to remove the ability for a page to force its own activation. If you can think of great arguments for doing that for my Intent let me know :)

Comment 4 by ha...@opera.com, Jun 1 2017

Noticed that Firefox uses a setting in the dialog "Allow dialogs from <site> to take you to their tab" in cases where the dialog was triggered on a tab which doesn't have focus.

Comment 5 by a...@chromium.org, Jun 1 2017

Yes, and Safari never activates a tab when it pops a dialog. So there's precedent.

I'm in the middle of a different Intent, but I do plan to get to this.

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

Labels: alert-activation

Comment 7 by a...@chromium.org, Jun 8 2018

Status: Fixed (was: Untriaged)
This should be fixed.

Sign in to add a comment