Closed Bug 1687893 Opened 3 years ago Closed 3 years ago

New tab-modal JS Alert doesn't give attention to different tab when attempting to close Firefox

Categories

(Firefox :: Untriaged, defect)

Firefox 86
defect

Tracking

()

VERIFIED FIXED
86 Branch
Tracking Status
firefox-esr78 --- unaffected
firefox84 --- unaffected
firefox85 --- unaffected
firefox86 --- verified

People

(Reporter: lolrepeatlol, Assigned: mtigley)

References

(Blocks 1 open bug, Regression)

Details

(Keywords: regression, Whiteboard: [proton-modals])

Attachments

(2 files)

Attached video Demonstration of bug

User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:86.0) Gecko/20100101 Firefox/86.0

Steps to reproduce:

I tried to close Firefox Nightly while listening to Apple Music.

Actual results:

Apple Music tried to ask whether I really wanted to close Firefox, but I didn't know because Firefox didn't switch the tab to Apple Music.

Expected results:

Apple Music should get attention when trying to close Firefox.

I believe the bug that caused this bug was https://bugzilla.mozilla.org/show_bug.cgi?id=1680637.

Status: UNCONFIRMED → NEW
Ever confirmed: true
Keywords: regression
Regressed by: 1680637
Has Regression Range: --- → yes
Whiteboard: [proton-modals]

Isn't this a dupe of bug 1686316? Micah, I thought the first patch there (that has already landed on central a few days ago) would have fixed this case - maybe I'm misunderstanding something?

Flags: needinfo?(mtigley)

(In reply to :Gijs (he/him) from comment #1)

Isn't this a dupe of bug 1686316? Micah, I thought the first patch there (that has already landed on central a few days ago) would have fixed this case - maybe I'm misunderstanding something?

I thought so too. The patch in bug 1686316 should be sending the proper event detail information for the new modal UI now. I took a closer look and it looks like the inPermitUnload value is undefined with the new prompts: https://searchfox.org/mozilla-central/source/browser/base/content/tabbrowser.js#5414. With the old one, this value is set to true so that whole block is skipped over to select the tab. So I think there's still information we're not passing to openPromptWithTabDialogBox through its args.

Flags: needinfo?(mtigley)

(In reply to Micah Tigley [:mtigley] from comment #2)

I took a closer look and it looks like the inPermitUnload value is undefined with the new prompts

...that's because we're assigning args.inPermitUnload to wasPermitUnload: https://searchfox.org/mozilla-central/source/browser/actors/PromptParent.jsm#276

Assignee: nobody → mtigley
Status: NEW → ASSIGNED
Pushed by mtigley@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/5fef480fe803
Make opening/closing eventDetail consistent between TabModalPrompt and TabDialogBox content prompts. r=Gijs
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 86 Branch

This issue is Verified as fixed in our Release 86.0.1 as well as our latest Release, Beta and Nightly versions of Firefox.

Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: