зеркало из https://github.com/mozilla/pjs.git
fix for bug #394226: can't drag favicon to an empty bookmarks toolbar
r=dietrich, mconnor a=mconnor for m8
This commit is contained in:
Родитель
b3ef3d9f13
Коммит
dee1a827cc
|
@ -794,14 +794,16 @@
|
|||
var ind = ib.firstChild;
|
||||
var direction = document.defaultView.getComputedStyle(this._self.parentNode, "").direction;
|
||||
if (direction == "ltr") {
|
||||
if (dropPoint.beforeIndex == -1)
|
||||
if (!this._self.childNodes.length)
|
||||
ind.style.marginLeft = 0 - this._self.boxObject.x - 7 + 'px'
|
||||
else if (dropPoint.beforeIndex == -1)
|
||||
ind.style.marginLeft = this._self.lastChild.boxObject.x +
|
||||
this._self.lastChild.boxObject.width - this._self.boxObject.x - 7 + 'px';
|
||||
else
|
||||
ind.style.marginLeft = this._self.childNodes[dropPoint.beforeIndex].boxObject.x -
|
||||
this._self.boxObject.x - 7 + 'px';
|
||||
} else {
|
||||
if (dropPoint.beforeIndex == -1)
|
||||
if (dropPoint.beforeIndex == -1 || !this._self.childNodes.length)
|
||||
ind.style.marginRight = '0px';
|
||||
else
|
||||
ind.style.marginRight = (this._self.childNodes[this._self.childNodes.length - 1].boxObject.x +
|
||||
|
|
Загрузка…
Ссылка в новой задаче