Closed Bug 1422747 Opened 6 years ago Closed 4 years ago

`moveTabTo` doesn't do the right thing when there is only 1 tab in the window


(Firefox :: Tabbed Browser, defect, P3)

57 Branch



Firefox 69
Tracking Status
firefox69 --- fixed


(Reporter: Gijs, Unassigned)




(1 obsolete file)

Trivial STR:

1. open new window
2. open browser console
3. run:

gBrowser.moveTabTo(gBrowser.selectedTab, 1)


nothing happens


new tab button is moved before the tab

You can see this with direct DOM manipulation by using:


(or ... insertBefore(gBrowser.selectedTab, null) )

We can guard for this case in the "moveTabTo" implementation, but it would be better to fix the underlying bug, unless fixing the underlying XBL bug is too difficult to bother doing before we get rid of XBL entirely.

Boris, do you have any idea what's going on here or why the fixes from bug 472020 are insufficient here and/or whether it's worth fixing something here over adding a guard to moveTabTo() ?
Flags: needinfo?(bzbarsky)
(This is currently exposed through webextensions, but we're adding a workaround in bug 1422211)
Blocks: 1422211
> or why the fixes from bug 472020 are insufficient here

Those fixes are known to not fix all issues like this.  That's why some of the reftests that bug added are marked as failing....

So it's possible that this situation looks like or ... or something else along those lines.

Emilio has poked at things like this recently; it's even possible that his in-flight patches fix this.  If not, we'd need to sit down and debug what's really going on here with the insertion points.
Flags: needinfo?(bzbarsky)
I could take a look when I have some free time, whatever that means... :)
Flags: needinfo?(emilio)
Priority: -- → P3
Comment on attachment 8936960 [details]
Bug 1422747: Make 2-level nested insertion points work correctly.

Err, this was supposed to be in bug 1425362. Anyway I don't think it's worth fixing. And to fix this particular case without redistributing the world we should keep track of all the nested insertion points, which we don't, and I don't think we should start doing...
Attachment #8936960 - Attachment is obsolete: true
Flags: needinfo?(emilio)
See Also: 1392352

Is this fixed now? Following STR in comment 0 I don't see anything happen.

Flags: needinfo?(gijskruitbosch+bugs)
Depends on: 1555060
See Also: war-on-xbl

(In reply to Brian Grinstead [:bgrins] from comment #6)

Is this fixed now? Following STR in comment 0 I don't see anything happen.

If the STR no longer break things then yes, this is fixed - no longer using XBL for the tabbrowser-tabs would presumably have fixed this based on the earlier comments. \o/

Closed: 4 years ago
Flags: needinfo?(gijskruitbosch+bugs)
Resolution: --- → FIXED
Target Milestone: --- → Firefox 69
You need to log in before you can comment on or make changes to this bug.