Open Bug 613918 Opened 14 years ago Updated 2 years ago

Page-specific warnings should not appear over tab-modal dialogs

Categories

(Toolkit :: General, defect)

defect

Tracking

()

People

(Reporter: jboriss, Unassigned)

References

Details

Attachments

(1 file)

In current nightlies, it's possible for a page-specific warning to display on top of a tab-modal dialog.  The specific one I can reproduce is an unresponsive script warning appearing over a tab-modal dialog.

Steps to reproduce:
1. In OSX, create a draft in Gmail but do not save it
2. Attempt to open a link.  Tab-modal message should appear
3. Wait a few minutes for an unresponsive script warning to appear. 

Expected outcome: Unresponsive script message does not appear.  Perhaps if a tab-modal dialog is present, warnings such as the unresponsive script warning should automatically take a default action (such as stopping the unresponsive script)

Actual outcome: Warning message appears over tab-modal message
OS: Mac OS X → All
Product: Firefox → Toolkit
QA Contact: general → general
Hardware: x86 → All
I do not understand why this is wrong behavior. I would expect that I am still notified about unresponsive scripts, even though an alert is open. Why would you not expect this?
(In reply to comment #1)
> I do not understand why this is wrong behavior. I would expect that I am still
> notified about unresponsive scripts, even though an alert is open. Why would
> you not expect this?

When this happens, the user sees two unrelated messages on top of each other.  A dialog or warning asks for the user's undivided attention when it appears; giving two at once is asking the user to simultaneously deal with two important issues.  Operating systems tend not to allow multiple page-warnings for the same reason.  Further, unresponsive script dialogs are not so crucial that they should dismiss or disable a present tab-modal dialog.
(In reply to comment #2)
> Further, unresponsive script dialogs are not so crucial that they
> should dismiss or disable a present tab-modal dialog.

If the script is unresponsive because it's got stuck waiting for the user (can that happen?), then I guess that may be true.

If the script is unresponsive for some other reason, then the entire browser, including any dialogs, will be unresponsive, so the unresponsive script dialog is the user's only hope of doing anything other than crashing out of Firefox, and it must trump everything else.
Which I guess means that dialog is not a good example of the title of this bug. The unresponsive script dialog is not page-specific - the script that is stuck may come from a website, but until it gets unstuck, the browser will hang, so it's necessarily a browser-modal dialog.

(Sorry for the double comment)
I'm not sure there's much we can do about this, in the general case, other than converting prompts to be tab-modal so you don't get a clash of styles.

Not sure how you managed to get this specific slow-script dialog (for chrome!) to appear, I can't reproduce it.
(In reply to comment #3)
> (In reply to comment #2)
> If the script is unresponsive for some other reason, then the entire browser,
> including any dialogs, will be unresponsive, so the unresponsive script dialog
> is the user's only hope of doing anything other than crashing out of Firefox,
> and it must trump everything else.

If the script is really the user's only hope of interacting with the browser, that seems like more reason to default to stopping the script and letting the user deal with the tab-modal prompt.

(In reply to comment #4)
> The unresponsive script dialog is not page-specific - the script that is stuck
> may come from a website, but until it gets unstuck, the browser will hang, so
> it's necessarily a browser-modal dialog.

While the unresponsive script effects performance of the whole browser, these messages are page-specific: they only appear on the window where the script is being unresponsive (in my experience).  You can see in the screenshot how the warning is attached to the top of the window.  The result of a message and a script is two warning messages in the same window - one of which can be interacted with only once the other has been dismissed.
(In reply to comment #5)
> I'm not sure there's much we can do about this, in the general case, other than
> converting prompts to be tab-modal so you don't get a clash of styles.

Can we just stop the unresponsive script automatically in a page where a tab-modal dialog is already present?
@Jennifer: Please do not assume that your situation is the same with others. You may not really care about an unresponsive script warning and may be okay to simply always block it. I on the other hand am on a slow machine and I get unresponsive script messages quite often. And I surely don't want these scripts to be blocked! Especially if a chrome script is blocked normally many actions become impossible. The whole interface of Firefox is based on XUL and JavaScript. Thus blocking such a script will make interaction impossible.

Thus maybe you think that the unresponsive script warning isn't of importance, but others think it is. It is illegitimate to simply take default actions, because they will always harm one of the sides.

I honestly see no problem in showing both prompts.
I agree this isn't a great user experience right now, but until we get electrolysis and the UI on its own thread, I don't really see a reasonable way for us to solve it in the interim.  (I do however believe we should do everything we possibly can to avoid having the UI itself produce the unresponsive script dialog, this crops up every so often).
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: