Bug 1947758 - improve group handling in gBrowser.moveTabForward/Backward. r=dao,tabbrowser-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D238124
This commit is contained in:
@@ -5865,7 +5865,7 @@
|
||||
nextTab.group.after(selectedTab);
|
||||
} else {
|
||||
// Enter first position of tab group.
|
||||
nextTab.group.prepend(selectedTab);
|
||||
nextTab.group.insertBefore(selectedTab, nextTab);
|
||||
}
|
||||
} else if (selectedTab.group != nextTab.group) {
|
||||
// Standalone tab after tab group.
|
||||
@@ -5874,6 +5874,10 @@
|
||||
nextTab.after(selectedTab);
|
||||
}
|
||||
});
|
||||
} else if (selectedTab.group) {
|
||||
// selectedTab is the last tab and is grouped.
|
||||
// remove it from its group.
|
||||
selectedTab.group.after(selectedTab);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5902,6 +5906,10 @@
|
||||
previousTab.before(selectedTab);
|
||||
}
|
||||
});
|
||||
} else if (selectedTab.group) {
|
||||
// selectedTab is the first tab and is grouped.
|
||||
// remove it from its group.
|
||||
selectedTab.group.before(selectedTab);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user