Skip to content

Commit ee2912e

Browse files
committed
Fix #59 - Dragging multiple tabs doesn't work sometimes
1 parent 6da0329 commit ee2912e

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

chrome/content/tabutils.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1702,6 +1702,11 @@ tabutils._multiTabHandler = function() {
17021702
this.selectedTabs = [];
17031703
});
17041704

1705+
TU_hookCode("gBrowser.onTabMove", "{", function() {
1706+
if (aTab.hasAttribute("multiselected"))
1707+
this._selectedTabs = null;
1708+
});
1709+
17051710
TU_hookCode("gBrowser.onTabHide", "}", function() {
17061711
if (aTab.hasAttribute("multiselected")) {
17071712
aTab.removeAttribute("multiselected");
@@ -1858,7 +1863,7 @@ tabutils._multiTabHandler = function() {
18581863
tabutils.addEventListener(gBrowser.mTabContainer, "dragstart", function(event) {
18591864
if (event.target.localName == "tab") {
18601865
let draggedTab = event.target;
1861-
let draggedTabs = gBrowser.contextTabsOf(draggedTab);
1866+
let draggedTabs = gBrowser.contextTabsOf(draggedTab).slice();
18621867
draggedTabs.splice(draggedTabs.indexOf(draggedTab), 1);
18631868
draggedTabs.unshift(draggedTab);
18641869

0 commit comments

Comments
 (0)