diff --git a/content/treestyletab/editBookmarkOverlay.js b/content/treestyletab/editBookmarkOverlay.js index 1d737722..d623d125 100644 --- a/content/treestyletab/editBookmarkOverlay.js +++ b/content/treestyletab/editBookmarkOverlay.js @@ -80,11 +80,12 @@ var TreeStyleTabBookmarksProperty = { }, _createSiblingsFragment : function(aCurrentItem) { - var selected = TreeStyleTabService.getParentItemForBookmarkItem(aCurrentItem); - var items = this._getItemsInFolder(PlacesUtils.bookmarks.getFolderIdForItem(aCurrentItem)); var treeStructure = TreeStyleTabService.getTreeStructureFromBookmarkItems(items); + var selected = treeStructure[current]; + if (selected > -1) selected = items[selected]; + var fragment = document.createDocumentFragment(); var afterCurrent = false; items.forEach(function(aId, aIndex) {