mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 493978 - Disable tab-detach when the tab is dropped very close to the tabbar (also fixes bug 494026). r=dietrich. a=beltzner.
This commit is contained in:
parent
9159839164
commit
5b82eb810a
@ -2794,6 +2794,7 @@ var newWindowButtonObserver = {
|
||||
flavourSet.appendFlavour("text/unicode");
|
||||
flavourSet.appendFlavour("text/x-moz-url");
|
||||
flavourSet.appendFlavour("application/x-moz-file", "nsIFile");
|
||||
flavourSet.appendFlavour("text/x-moz-text-internal"); // for tabs
|
||||
return flavourSet;
|
||||
}
|
||||
}
|
||||
|
@ -2266,9 +2266,11 @@
|
||||
// check if the drop point is horizontally within the window
|
||||
if (eX > wX && eX < (wX + window.outerWidth)) {
|
||||
var bo = this.mTabContainer.mTabstrip.boxObject;
|
||||
var tabbarEndScreenY = bo.screenY + bo.height;
|
||||
// also avoid detaching if the the tab was dropped too close to
|
||||
// the tabbar (half a tab)
|
||||
var endScreenY = bo.screenY + 1.5 * bo.height;
|
||||
var eY = aEvent.screenY;
|
||||
if (eY < tabbarEndScreenY && eY > window.screenY)
|
||||
if (eY < endScreenY && eY > window.screenY)
|
||||
return;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user