mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 320638 - Allow dropping links in-between tabs. r=gavin
This commit is contained in:
parent
37b1df3df1
commit
3f66576697
@ -2773,7 +2773,16 @@
|
||||
<method name="_getDragTargetTab">
|
||||
<parameter name="event"/>
|
||||
<body><![CDATA[
|
||||
return event.target.localName == "tab" ? event.target : null;
|
||||
let tab = event.target.localName == "tab" ? event.target : null;
|
||||
if (tab &&
|
||||
(event.type == "drop" || event.type == "dragover") &&
|
||||
event.dataTransfer.dropEffect == "link") {
|
||||
let boxObject = tab.boxObject;
|
||||
if (event.screenX < boxObject.screenX + boxObject.width * .25 ||
|
||||
event.screenX > boxObject.screenX + boxObject.width * .75)
|
||||
return null;
|
||||
}
|
||||
return tab;
|
||||
]]></body>
|
||||
</method>
|
||||
|
||||
@ -3022,6 +3031,7 @@
|
||||
this._dragTime = Date.now();
|
||||
if (Date.now() >= this._dragTime + this._dragOverDelay)
|
||||
this.selectedItem = tab;
|
||||
ind.collapsed = true;
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user