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

Issue 849816 link

Starred by 6 users

Issue metadata

Status: Fixed
Owner:
Closed: Jun 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Android , Windows , Chrome , Mac , Fuchsia
Pri: 2
Type: Bug

Blocking:
issue 439267



Sign in to add a comment

Make confirm() not activate the tab

Project Member Reported by a...@chromium.org, Jun 5 2018

Issue description

Right now, neither alert() nor prompt() activate the calling tab.

prompt() is ignored and returns false if called from a non-foremost window. We should do the same for confirm().
 
Project Member

Comment 1 by bugdroid1@chromium.org, Jun 7 2018

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

commit 9d4b8e8e9b70e3b9f018a7a398b650c2b34bc654
Author: Avi Drissman <avi@chromium.org>
Date: Thu Jun 07 20:47:01 2018

Do not allow confirm dialogs to activate tabs.

BUG= 849816 

Change-Id: Ie726f28d1f6c760f8330b03a93387ad7479c335c
Reviewed-on: https://chromium-review.googlesource.com/1089659
Reviewed-by: Charlie Harrison <csharrison@chromium.org>
Reviewed-by: Becky Zhou <huayinz@chromium.org>
Commit-Queue: Avi Drissman <avi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#565397}
[modify] https://crrev.com/9d4b8e8e9b70e3b9f018a7a398b650c2b34bc654/chrome/browser/ui/android/javascript_dialog_android.cc
[modify] https://crrev.com/9d4b8e8e9b70e3b9f018a7a398b650c2b34bc654/chrome/browser/ui/blocked_content/popup_blocker_browsertest.cc
[modify] https://crrev.com/9d4b8e8e9b70e3b9f018a7a398b650c2b34bc654/chrome/browser/ui/browser_browsertest.cc
[modify] https://crrev.com/9d4b8e8e9b70e3b9f018a7a398b650c2b34bc654/chrome/browser/ui/javascript_dialogs/javascript_dialog.cc
[modify] https://crrev.com/9d4b8e8e9b70e3b9f018a7a398b650c2b34bc654/chrome/browser/ui/javascript_dialogs/javascript_dialog.h
[modify] https://crrev.com/9d4b8e8e9b70e3b9f018a7a398b650c2b34bc654/chrome/browser/ui/javascript_dialogs/javascript_dialog_cocoa.mm
[modify] https://crrev.com/9d4b8e8e9b70e3b9f018a7a398b650c2b34bc654/chrome/browser/ui/javascript_dialogs/javascript_dialog_mac.cc
[modify] https://crrev.com/9d4b8e8e9b70e3b9f018a7a398b650c2b34bc654/chrome/browser/ui/javascript_dialogs/javascript_dialog_tab_helper.cc
[modify] https://crrev.com/9d4b8e8e9b70e3b9f018a7a398b650c2b34bc654/chrome/browser/ui/javascript_dialogs/javascript_dialog_views.cc

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

Status: Fixed (was: Untriaged)

Comment 3 by rbyers@chromium.org, Jun 15 2018

Labels: M-69
Cc: krajshree@chromium.org
Labels: Needs-Feedback
avi@ - Thanks for filing the issue...!!
Could you please provide a sample test file/url to verify the issue from TE-end.

Thanks...!!

Comment 5 by a...@chromium.org, Jun 25 2018

Re comment 4:

Hi! Sorry for the delay; I was out.

To see the effects here:
1. Open two tabs; load the test page (http://avidrissman.github.io/htmltests/delay.html) in one tab
2. Switch to the test page and click the "Fire a confirm dialog" button
3. **Within the next two seconds** switch tabs
4. Wait.

The new page should remain active. The test page should not activate.
459460-import-history.log
61.0 KB View Download

Sign in to add a comment