Open Bug 1377039 Opened 7 years ago Updated 2 years ago

Closing Gmail tab after opening email in another tab exits Firefox even with browser.tabs.closeWindowWithLastTab set to false

Categories

(Firefox :: Tabbed Browser, defect, P3)

54 Branch
defect

Tracking

()

People

(Reporter: silogen, Unassigned)

Details

User Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:54.0) Gecko/20100101 Firefox/54.0 Build ID: 20170612122443 Steps to reproduce: With no other tabs open, open Gmail Open an email in another tab Close main Gmail tab Actual results: Firefox dialog says "This page is asking you to confirm that you want to leave - data you have entered may not be saved." Click "Leave page" Gmail tab closes Child tab closes and then Firefox exits Expected results: Firefox should stay open Owner tab shouldn't close before closing child tab?
Component: Untriaged → WebExtensions: Frontend
Product: Firefox → Toolkit
Component: WebExtensions: Frontend → Tabbed Browser
Product: Toolkit → Firefox
(In reply to Sil from comment #0) > User Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:54.0) Gecko/20100101 > Firefox/54.0 > Build ID: 20170612122443 > > Steps to reproduce: > > With no other tabs open, open Gmail > > Open an email in another tab How? I only see a button "open e-mail in a new window". Clicking that does indeed open a new window, not a new tab. > Owner tab shouldn't close before closing child tab? The child tab/window is script-opened, and can close itself. It also has a reference to its opener (ie the original gmail tab) and can thus know when the parent tab is going away. As a result, it can then close itself. We could potentially make window.close() not work if something is the last tab, but I don't know how easy implementing that would be...
Flags: needinfo?(silogen)
Re-reading that this is about the pref, I suppose this code: https://dxr.mozilla.org/mozilla-central/rev/d9a144b7b6d994fc9a497c53b13f51a2a654d85e/browser/base/content/tabbrowser.xml#5152-5160 and this code: https://dxr.mozilla.org/mozilla-central/rev/d9a144b7b6d994fc9a497c53b13f51a2a654d85e/browser/base/content/tabbrowser.xml#5557-5563 should check the pref and fall back to the 'normal' removeTab path if the pref is set to false... probably if and only if this isn't a popup window...
Status: UNCONFIRMED → NEW
Ever confirmed: true
(In reply to :Gijs from comment #1) > (In reply to Sil from comment #0) > > User Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:54.0) Gecko/20100101 > > Firefox/54.0 > > Build ID: 20170612122443 > > > > Steps to reproduce: > > > > With no other tabs open, open Gmail > > > > Open an email in another tab > > How? I only see a button "open e-mail in a new window". Clicking that does > indeed open a new window, not a new tab. Ctrl+click
Flags: needinfo?(silogen)
Priority: -- → P3
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.