Bug 797430 - Fix cannot move a bookmark separator by drag & drop. r=mak

This commit is contained in:
OHZEKI Tetsuharu 2012-10-03 18:19:23 -04:00
parent f8270fa49a
commit ade318a874

View File

@ -1425,13 +1425,13 @@ let PlacesControllerDragHelper = {
if (ip.isTag && ip.orientation == Ci.nsITreeView.DROP_ON &&
dragged.type != PlacesUtils.TYPE_X_MOZ_URL &&
(dragged.type != PlacesUtils.TYPE_X_MOZ_PLACE ||
dragged.uri.startsWith("place:")))
(dragged.uri && dragged.uri.startsWith("place:")) ))
return false;
// The following loop disallows the dropping of a folder on itself or
// on any of its descendants.
if (dragged.type == PlacesUtils.TYPE_X_MOZ_PLACE_CONTAINER ||
dragged.uri.startsWith("place:")) {
(dragged.uri && dragged.uri.startsWith("place:")) ) {
let parentId = ip.itemId;
while (parentId != PlacesUtils.placesRootId) {
if (dragged.concreteId == parentId || dragged.id == parentId)