Closed Bug 864247 Opened 11 years ago Closed 11 years ago

Work - "Leave page" dialog should not be able to appear multiple times

Categories

(Firefox for Metro Graveyard :: Browser, defect)

x86
Windows 8.1
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
Firefox 26

People

(Reporter: virgil.dicu, Assigned: TimAbraldes)

References

Details

(Whiteboard: feature=work [preview])

Attachments

(2 files)

Attached image Leave page dialog
Mozilla/5.0 (Windows NT 6.2; rv:23.0) Gecko/20130421 Firefox/23.0

This is the best story I could find to block against.

1. Visit http://stackoverflow.com/questions/16141811/handle-same-events-from-different-windows
2. Type anything in the text field
3. Close the tab using the X button.
The Leave page prompt is displayed.
4. Select Back button.

Actual result: Another prompt overlaps the leave page dialog. The title text is duplicated.

Not sure what the expected behavior should be here, but the prompt should either have a relevant title and be better aligned or there should be no action allowed for back/new tab buttons while the Leave Page dialog is displayed.
OS: Windows 8 → Windows 8 Metro
Whiteboard: feature=defect c=Tabs_app_bar u=metro_firefox_user p=0
Blocks: 866304
No longer blocks: metrov1defect&change, 831925
Summary: Defect - Leave page dialog is overlapped by a confirm dialog when selecting back → Work - Leave page dialog is overlapped by a confirm dialog when selecting back
Whiteboard: feature=defect c=Tabs_app_bar u=metro_firefox_user p=0 → feature=work
The behavior described in this bug is due to a couple of problems:
  1) The "Stay on page" dialog should not be able to appear more than once
  2) Any time a dialog appears when another dialog is already visible, the new dialog appears with no text, and the text gets appended to the old dialog

Problem 2 will be fixed by the patches in bug 866304. This bug will track only problem 1.
Assignee: nobody → tabraldes
Blocks: 831978
No longer blocks: 866304
Summary: Work - Leave page dialog is overlapped by a confirm dialog when selecting back → Work - "Leave page" dialog should not be able to appear multiple times
No longer blocks: 831978
Blocks: 886563
No longer blocks: 886563
Blocks: 892575
Whiteboard: feature=work → feature=work [preview]
Attached patch Patch v1Splinter Review
If nsDocumentViewer::PermitUnload is called and another call to nsDocumentViewer::PermitUnload has not yet returned (meaning that the user has not yet selected an option from the 'stay on page' prompt), then simply allow the unload to happen.

Another option under consideration is to disallow any unloads while the prompt is active (i.e. force the user to respond to the existing prompt, and ignore any actions that would cause another prompt to appear).

In the long run, we should probably get UX input as to what exactly should happen when the user tries to do something to a tab that already has an onbeforeunload prompt active.

For additional context/discussion, please see bug 866304:
  [1] https://bugzilla.mozilla.org/show_bug.cgi?id=866304#c19
  [2] https://bugzilla.mozilla.org/show_bug.cgi?id=866304#c29
  [3] https://bugzilla.mozilla.org/show_bug.cgi?id=866304#c31
Attachment #785139 - Flags: review?(roc)
https://hg.mozilla.org/mozilla-central/rev/8d0fa17572ad
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 26
Blocks: 616853
OS: Windows 8 Metro → Windows 8.1
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: