We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6dc5601 commit 5737c8aCopy full SHA for 5737c8a
1 file changed
webextensions/background/commands.js
@@ -490,6 +490,23 @@ async function performTabsDragDrop(params = {}) {
490
return;
491
}
492
493
+ const nativeTabGroupId = params.attachTo ?
494
+ params.attachTo.groupId :
495
+ (params.insertAfter && params.insertAfter.groupId != -1) ?
496
+ params.insertAfter.groupId :
497
+ params.insertBefore ?
498
+ params.insertBefore.groupId :
499
+ -1;
500
+ if (nativeTabGroupId == -1) {
501
+ await browser.tabs.ungroup(params.tabs.map(tab => tab.id));
502
+ }
503
+ else {
504
+ await browser.tabs.group({
505
+ groupId: nativeTabGroupId,
506
+ tabIds: params.tabs.map(tab => tab.id),
507
+ });
508
509
+
510
const movedTabs = await moveTabsWithStructure(params.tabs, {
511
...params,
512
windowId, destinationWindowId,
0 commit comments