зеркало из https://github.com/mozilla/pjs.git
Forgot a file for bug 423200 (for mak77@supereva.it, r=dietrich)
This commit is contained in:
Родитель
f3c725cfd2
Коммит
7d4da78f05
|
@ -464,7 +464,13 @@ placesMoveItemTransactions.prototype = {
|
|||
},
|
||||
|
||||
undoTransaction: function PMIT_undoTransaction() {
|
||||
PlacesUtils.bookmarks.moveItem(this._id, this._oldContainer, this._oldIndex);
|
||||
// moving down in the same container takes in count removal of the item
|
||||
// so to revert positions we must move to oldIndex + 1
|
||||
if (this._newContainer == this._oldContainer &&
|
||||
this._oldIndex > this._newIndex)
|
||||
PlacesUtils.bookmarks.moveItem(this._id, this._oldContainer, this._oldIndex + 1);
|
||||
else
|
||||
PlacesUtils.bookmarks.moveItem(this._id, this._oldContainer, this._oldIndex);
|
||||
}
|
||||
};
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче