Open Bug 1763916 Opened 3 years ago Updated 1 year ago

Fix webextension tab events when adoptTab fails

Categories

(WebExtensions :: Frontend, defect, P3)

defect

Tracking

(Not tracked)

ASSIGNED

People

(Reporter: Oriol, Assigned: Oriol)

References

(Blocks 1 open bug)

Details

See detailed STR in bug 1762800 comment 0.

Using gBrowser.adoptTab to move a tab into a new window may not succeed (e.g. bug 1758307).

In that case,

  • When gBrowser.adoptTab attempts to move, webextensions receive an onDetached event on the old window, and an onAttached event in the new one.
  • When gBrowser.adoptTab aborts, webextensions receive an onRemoved event on the new window.
  • This utterly confuses extensions, making them think that the tab was moved and then removed, but actually it's still in the original window! E.g. my Tab Counter Plus is affected.

I guess that no event should be fired at all. Or at least, after the first onDetached/onAttached pair, when the adoption fails fire these events again in reverse, as if the tab moved forth and back.

The severity field is not set for this bug.
:mixedpuppy, could you have a look please?

For more information, please visit auto_nag documentation.

Flags: needinfo?(mixedpuppy)
Severity: -- → S3
Priority: -- → P3

Sorry, there was a problem with the detection of inactive users. I'm reverting the change.

Assignee: nobody → oriol-bugzilla
Status: NEW → ASSIGNED
Flags: needinfo?(mixedpuppy)
You need to log in before you can comment on or make changes to this bug.