diff --git a/browser/components/places/content/menu.xml b/browser/components/places/content/menu.xml index ead46e5363f4..92e47851f3c1 100755 --- a/browser/components/places/content/menu.xml +++ b/browser/components/places/content/menu.xml @@ -181,6 +181,8 @@ this._overFolder.closeMenuTimer = this._overFolder .setTimer(this._overFolder.hoverTime); } + + this._rootView._draggedNode = null; ]]> @@ -896,8 +898,9 @@ diff --git a/browser/components/places/content/toolbar.xml b/browser/components/places/content/toolbar.xml index 4867a39e75b4..b2c4d73018c7 100755 --- a/browser/components/places/content/toolbar.xml +++ b/browser/components/places/content/toolbar.xml @@ -384,26 +384,28 @@ @@ -916,6 +918,8 @@ if (this._overFolder.node) this._overFolder.closeTimer = this._setTimer(this._overFolder.hoverTime); PlacesControllerDragHelper.currentDropTarget = null; + + this._self._draggedNode = null; }, getSupportedFlavours: function TBV_DO_getSupportedFlavours() { diff --git a/browser/components/places/content/tree.xml b/browser/components/places/content/tree.xml index 945988836cdc..279958f795b0 100644 --- a/browser/components/places/content/tree.xml +++ b/browser/components/places/content/tree.xml @@ -440,7 +440,7 @@ return this._cachedInsertionPoint = null; } - var orientation = Ci.nsITreeView.DROP_AFTER; + var orientation = Ci.nsITreeView.DROP_BEFORE; // If there is no selection, insert at the end of the container. if (!this.hasSelection) { var index = this.view.rowCount - 1; @@ -451,9 +451,9 @@ // This is a two-part process. The first part is determining the drop // orientation. - // * The default orientation is to drop _after_ the selected item. - // * If the selected item is an open container, the default - // orientation is to drop _into_ that container. + // * The default orientation is to drop _before_ the selected item. + // * If the selected item is a container, the default orientation + // is to drop _into_ that container. // // Warning: It may be tempting to use tree indexes in this code, but // you must not, since the tree is nested and as your tree @@ -468,18 +468,18 @@ var min = { }, max = { }; selection.getRangeAt(rc - 1, min, max); - // If the sole selection is an open container, insert into it rather - // than adjacent to it. Note that this only applies to _single_ - // selections - if the last element within a multi-selection is an - // open folder, insert _adjacent_ to the selection. + // If the sole selection is a container, and we are not in + // a flatlist, insert into it. + // Note that this only applies to _single_ selections, + // if the last element within a multi-selection is a + // container, insert _adjacent_ to the selection. // // If the sole selection is the bookmarks toolbar folder, we insert // into it even if it is not opened var itemId = PlacesUtils.getConcreteItemId(resultView.nodeForTreeIndex(max.value)); if (selection.count == 1 && resultView.isContainer(max.value) && - (resultView.isContainerOpen(max.value) || - itemId == PlacesUtils.bookmarksMenuFolderId)) + !this.flatList) orientation = Ci.nsITreeView.DROP_ON; this._cachedInsertionPoint =