Bug 481904 - Dragging a tab stops scrolling at the tab's position when dragging to the first/last tab and back. r=mano

--HG--
extra : rebase_source : 9a850fa1ec9b0f38502b564691ad6b487cbe8d4e
This commit is contained in:
Dão Gottwald 2010-03-10 13:44:06 +01:00
parent 84ecdc13b7
commit a12d2b8675

View File

@ -2024,6 +2024,20 @@
</body>
</method>
<method name="_continueScroll">
<parameter name="aEvent"/>
<body><![CDATA[
// Workaround for bug 481904: Dragging a tab stops scrolling at
// the tab's position when dragging to the first/last tab and back.
var t = this.selectedTab;
if (aEvent.screenX >= t.boxObject.screenX &&
aEvent.screenX <= t.boxObject.screenX + t.boxObject.width &&
aEvent.screenY >= t.boxObject.screenY &&
aEvent.screenY <= t.boxObject.screenY + t.boxObject.height)
this.tabContainer.mTabstrip.ensureElementIsVisible(t);
]]></body>
</method>
<method name="_onDragOver">
<parameter name="aEvent"/>
<body>
@ -2033,6 +2047,7 @@
var ind = this._tabDropIndicator;
if (effects == "" || effects == "none") {
ind.collapsed = true;
this._continueScroll(aEvent);
return;
}
aEvent.preventDefault();
@ -2304,6 +2319,7 @@
return;
this._tabDropIndicator.collapsed = true;
this._continueScroll(aEvent);
aEvent.stopPropagation();
]]>
</body>