don't drag whole tree if there is any selection
This commit is contained in:
parent
148790e877
commit
86d59ed306
@ -405,15 +405,14 @@ var TreeStyleTabBookmarksService = {
|
|||||||
|
|
||||||
_onTabsDrop : function TSTBMService_onTabsDrop(aEvent)
|
_onTabsDrop : function TSTBMService_onTabsDrop(aEvent)
|
||||||
{
|
{
|
||||||
var groups = this.splitTabsToSubtrees(aEvent.tabs || []);
|
var tabs = aEvent.tabs || aEvent.getData('tabs') || [];
|
||||||
|
var groups = this.splitTabsToSubtrees(tabs);
|
||||||
if (
|
if (
|
||||||
groups.length == 1 &&
|
groups.length == 1 &&
|
||||||
(
|
this.bookmarkDroppedTabsBehavior() != this.kBOOKMARK_DROPPED_TABS_ALL &&
|
||||||
this.bookmarkDroppedTabsBehavior() != this.kBOOKMARK_DROPPED_TABS_ALL ||
|
!Array.some(tabs, function(aTab) {
|
||||||
Array.some(aEvent.tabs, function(aTab) {
|
return aTab.getAttribute('multiselected') == 'true';
|
||||||
return aTab.getAttribute('multiselected') == 'true';
|
})
|
||||||
})
|
|
||||||
)
|
|
||||||
) {
|
) {
|
||||||
aEvent.preventDefault();
|
aEvent.preventDefault();
|
||||||
aEvent.stopPropagation();
|
aEvent.stopPropagation();
|
||||||
|
@ -735,27 +735,13 @@ catch(e) {
|
|||||||
event : aEvent
|
event : aEvent
|
||||||
};
|
};
|
||||||
var tabsInfo = this.getDraggedTabsInfoFromOneTab(actionInfo, aTab);
|
var tabsInfo = this.getDraggedTabsInfoFromOneTab(actionInfo, aTab);
|
||||||
if (tabsInfo.draggedTabs.length <= 1)
|
|
||||||
return;
|
|
||||||
|
|
||||||
/*
|
|
||||||
if (
|
if (
|
||||||
'MultipleTabService' in w &&
|
tabsInfo.draggedTabs.length <= 1 ||
|
||||||
'isSelected' in w.MultipleTabService &&
|
Array.some(tabsInfo.draggedTabs, function(aTab) {
|
||||||
'getSelectedTabs' in w.MultipleTabService &&
|
return aTab.getAttribute('multiselected') == 'true';
|
||||||
'clearSelection' in w.MultipleTabService &&
|
})
|
||||||
'setSelection' in w.MultipleTabService &&
|
|
||||||
(
|
|
||||||
!w.MultipleTabService.isSelected(aTab) ||
|
|
||||||
w.MultipleTabService.getSelectedTabs(sv.browser) == [aTab]
|
|
||||||
)
|
)
|
||||||
) {
|
return;
|
||||||
w.MultipleTabService.clearSelection(sv.browser);
|
|
||||||
tabsInfo.draggedTabs.forEach(function(aTab) {
|
|
||||||
w.MultipleTabService.setSelection(aTab, true);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
w['piro.sakura.ne.jp'].tabsDragUtils.startTabsDrag(aEvent, tabsInfo.draggedTabs);
|
w['piro.sakura.ne.jp'].tabsDragUtils.startTabsDrag(aEvent, tabsInfo.draggedTabs);
|
||||||
},
|
},
|
||||||
|
Loading…
x
Reference in New Issue
Block a user