Open Bug 1459402 Opened 7 years ago Updated 2 years ago

[tracking] APIs to control behavior after tab closing

Categories

(WebExtensions :: General, enhancement, P3)

57 Branch
Unspecified
All
enhancement

Tracking

(Not tracked)

UNCONFIRMED

People

(Reporter: robert_abc3, Unassigned)

References

(Depends on 1 open bug, Blocks 2 open bugs)

Details

(Keywords: meta)

User Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/66.0.3359.139 Safari/537.36

Steps to reproduce:

The aim of this meta-bug is to group all bugs related to missing and available APIs to customize/control behavior after tab closing.

Here, it can be also the place to discuss what is the best way to support these APIs.


Actual results:

-


Expected results:

-
Blocks: 1226546
Severity: normal → enhancement
Component: Untriaged → WebExtensions: General
Depends on: 1422509, 1419947
Keywords: meta
OS: Unspecified → All
Priority: -- → P3
Product: Firefox → Toolkit
Depends on: 1455264
Blocks: 1333837
Product: Toolkit → WebExtensions
Depends on: 1500479
Depends on: 1497710

From what I understand, extensions that want to control which tab to activate after closing must listen to multiple tab events, calling browser.tabs.moveInSuccession() or browser.tabs.update() all the time. This could be simplified if we had something like onBeforeTabClose so that extensions could set successorTabId just before the tab is removed.

Right before tab closing is the only moment extensions need to set successorTabId, it's not optimal that they need to track every onActivated, onMoved, onRemoved, onUpdated just because there's no way to anticipate that the tab is about to close.

See https://bugzilla.mozilla.org/show_bug.cgi?id=1419947#c3 and nearby comments; one of the design inputs that led to browser.tabs.moveInSuccession was the constraint that closing a tab shouldn't block on any calls out to extensions before the next tab is activated.

Severity: normal → S3
See Also: → 1811162
You need to log in before you can comment on or make changes to this bug.