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