Open Bug 1400631 Opened 8 years ago Updated 3 years ago

browser.tabs.move() has unexpected behavior when moving tabs within the same window where tab positions are less than insertion point

Categories

(WebExtensions :: General, defect, P3)

defect

Tracking

(Not tracked)

People

(Reporter: u462496, Unassigned)

References

Details

(Whiteboard: [tabs])

When tabs are moved within the same window: Tab(s) with _tPos's > insertionPoint are inserted at insertionPoint - expected behavior. Tab(s) with _tPos's < insertionPoint are inserted at insertionPoint + 1 - not expected behavior.
Priority: -- → P3
Whiteboard: [tabs]
I filed a duplicate/invalid bug on this at https://bugzilla.mozilla.org/show_bug.cgi?id=1464753 I ran into this while implementing drag/drop in tabhunter, and noticed not only the obvious off-by-one error reported here as well as in other bugs, but I've observed some symptoms that point to statefulness. Say I've got tabs [t1 t2 ... t10] and try to move tabs [t2 t3 t4] targeting t7. Expected: [t1 t5 t6 t2 t3 t4 t7 ... t10 ] First 1-2 times observed: [t1 t5 t6 t7 t2 t3 t4 t8 t9 t10 ] *Sometimes* later observed: [t1 t5 t6 t7 t2 t8 t3 t9 t10 t4 ] -- off-by-one errors build up incrementally I filed a new bug because I wrote a mini-extension that lets me test the different tab-moving scenarios and different ways to move the tabs interactively. But I just discovered YUKI's tests at https://bugzilla.mozilla.org/show_bug.cgi?id=1394477 and will have a look
Product: Toolkit → WebExtensions
Component: Untriaged → General
See Also: → 1766159
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.