Defect - New tab created if you receive "Leave Page" error and only a single tab is present

VERIFIED FIXED in Firefox 23

Status

Firefox for Metro
App Bar
P1
normal
VERIFIED FIXED
5 years ago
4 years ago

People

(Reporter: kjozwiak, Assigned: TimAbraldes)

Tracking

unspecified
Firefox 23
x86_64
Windows 8.1
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: feature=defect c=Tabs_app_bar u=metro_firefox_user p=1)

Attachments

(1 attachment)

(Reporter)

Description

5 years ago
When you only have a single tab opened and you receive the error message indicating that you are about to leave the website and the data entered will not be saved, a new tab will be created despite selecting "Stay on Page"

Steps to reproduce the issue:

1) Open Firefox Metro
2) Go to stackoverflow.com
3) Select a random question
4) Insert something random in the "Reply" field
5) Select the "X" on the tabs app bar (make sure that's your only tab currently opened). You will notice a new tab being created
6) Select "Stay on Page" (Notice the new Tab)

Current Behavior:

- When you only have a single tab opened and you receive the error message indicating your data will not be saved, a new tab is automatically created

Expected Behavior:

- A new tab should only be created if the user selects "Leave Page" and there is no other tabs currently opened
(Reporter)

Comment 1

5 years ago
it5 consideration?
Flags: needinfo?(mmucci)
Moving to Iteration #5 for consideration as a Defect Story.
Blocks: 850809
No longer blocks: 841214
Flags: needinfo?(mmucci)
Priority: -- → P1
QA Contact: jbecerra
Whiteboard: feature=defect c=Tabs_app_bar u=metro_firefox_user p=0
This is probably related to the code for opening a new tab when the last tab is closed. We should make sure the tab is actually closing before executing that logic.
Whiteboard: feature=defect c=Tabs_app_bar u=metro_firefox_user p=0 → feature=defect c=Tabs_app_bar u=metro_firefox_user p=1
Assignee: nobody → tabraldes

Updated

5 years ago
Status: NEW → ASSIGNED

Updated

5 years ago
Blocks: 855905
No longer blocks: 850809
Created attachment 738280 [details] [diff] [review]
Patch v1

This patch slightly rearranges some "close tab" logic in browser.js and browser-ui.js so that we only open a new tab if the last tab is actually closing.
Attachment #738280 - Flags: review?(fyan)

Comment 5

5 years ago
Comment on attachment 738280 [details] [diff] [review]
Patch v1

Review of attachment 738280 [details] [diff] [review]:
-----------------------------------------------------------------

Yay for less setTimeouts!

Thanks for working on this. :)
Attachment #738280 - Flags: review?(fyan) → review+
https://hg.mozilla.org/mozilla-central/rev/49b7327cd49f
Status: ASSIGNED → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 23
For Virgil to test and verify.
Flags: needinfo?(virgil.dicu)
Mozilla/5.0 (Windows NT 6.2; rv:23.0) Gecko/20130421 Firefox/23.0

Scenario in comment 0 is no longer reproducible.

Filed bug 864247 for case when back button is selected with the dialog open.

In addition:
-checked that both options of the dialog performed the desired action with one tab/multiple tabs open
-checked back/new tab buttons functionality with the prompt open
Status: RESOLVED → VERIFIED
Flags: needinfo?(virgil.dicu)
Verified for it8
By the way, this test could easily be automated.  Perhaps we should automate this test to reduce the load on our QA team?
OS: Windows 8 Metro → Windows 8.1
You need to log in before you can comment on or make changes to this bug.