Handle hidden/collapsed tabs while tab dragging correctly
This commit is contained in:
parent
d66b7083d2
commit
0db8f5f765
@ -131,6 +131,8 @@
|
|||||||
'if (!("animLastScreenX" in draggedTab._dragData))',
|
'if (!("animLastScreenX" in draggedTab._dragData))',
|
||||||
'let tabsWidth = 0;\n' +
|
'let tabsWidth = 0;\n' +
|
||||||
'draggedTabs.forEach(function(draggedTab) {\n' +
|
'draggedTabs.forEach(function(draggedTab) {\n' +
|
||||||
|
' let style = window.getComputedStyle(draggedTab, null);\n' +
|
||||||
|
' if (style.visibility != "collapse" && style.display != "none")\n' +
|
||||||
' tabsWidth += draggedTab.boxObject[size];\n' +
|
' tabsWidth += draggedTab.boxObject[size];\n' +
|
||||||
' window["piro.sakura.ne.jp"].tabsDragUtils.fixDragData(draggedTab._dragData);\n' +
|
' window["piro.sakura.ne.jp"].tabsDragUtils.fixDragData(draggedTab._dragData);\n' +
|
||||||
' $&'
|
' $&'
|
||||||
@ -219,7 +221,8 @@
|
|||||||
//
|
//
|
||||||
// let tabsWidth = 0;
|
// let tabsWidth = 0;
|
||||||
// draggedTabs.forEach(function(draggedTab) {
|
// draggedTabs.forEach(function(draggedTab) {
|
||||||
// tabsWidth += draggedTab.boxObject[size]/*.width*/;
|
// let style = window.getComputedStyle(draggedTab, null);
|
||||||
|
// if (style.visibility != "collapse" && style.display != "none") tabsWidth += draggedTab.boxObject[size]/*.width*/;
|
||||||
// window['piro.sakura.ne.jp'].tabsDragUtils.fixDragData(draggedTab._dragData);
|
// window['piro.sakura.ne.jp'].tabsDragUtils.fixDragData(draggedTab._dragData);
|
||||||
// if (!("animLastScreenX" in draggedTab._dragData))
|
// if (!("animLastScreenX" in draggedTab._dragData))
|
||||||
// draggedTab._dragData.animLastScreenX = draggedTab._dragData[position]/*.screenX*/;
|
// draggedTab._dragData.animLastScreenX = draggedTab._dragData[position]/*.screenX*/;
|
||||||
|
@ -996,15 +996,13 @@ catch(e) {
|
|||||||
if (tabbar._tabDropIndicator)
|
if (tabbar._tabDropIndicator)
|
||||||
tabbar._tabDropIndicator.collapsed = true;
|
tabbar._tabDropIndicator.collapsed = true;
|
||||||
|
|
||||||
var draggedTab;
|
var draggedTab = dt.mozGetDataAt(TAB_DROP_TYPE, 0);
|
||||||
if (dt.dropEffect != 'link') {
|
if (dt.dropEffect != 'link' && !draggedTab) {
|
||||||
draggedTab = dt.mozGetDataAt(TAB_DROP_TYPE, 0);
|
|
||||||
if (!draggedTab) {
|
|
||||||
aEvent.stopPropagation();
|
aEvent.stopPropagation();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
if (draggedTab)
|
||||||
draggedTab.style.opacity = '';
|
draggedTab.style.opacity = '';
|
||||||
}
|
|
||||||
|
|
||||||
var sourceBrowser = sv.getTabBrowserFromChild(draggedTab);
|
var sourceBrowser = sv.getTabBrowserFromChild(draggedTab);
|
||||||
if (draggedTab && sourceBrowser != b)
|
if (draggedTab && sourceBrowser != b)
|
||||||
|
Loading…
Reference in New Issue
Block a user