mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 797430 - Fix cannot move a bookmark separator by drag & drop. r=mak
This commit is contained in:
parent
f8270fa49a
commit
ade318a874
@ -1425,13 +1425,13 @@ let PlacesControllerDragHelper = {
|
|||||||
if (ip.isTag && ip.orientation == Ci.nsITreeView.DROP_ON &&
|
if (ip.isTag && ip.orientation == Ci.nsITreeView.DROP_ON &&
|
||||||
dragged.type != PlacesUtils.TYPE_X_MOZ_URL &&
|
dragged.type != PlacesUtils.TYPE_X_MOZ_URL &&
|
||||||
(dragged.type != PlacesUtils.TYPE_X_MOZ_PLACE ||
|
(dragged.type != PlacesUtils.TYPE_X_MOZ_PLACE ||
|
||||||
dragged.uri.startsWith("place:")))
|
(dragged.uri && dragged.uri.startsWith("place:")) ))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
// The following loop disallows the dropping of a folder on itself or
|
// The following loop disallows the dropping of a folder on itself or
|
||||||
// on any of its descendants.
|
// on any of its descendants.
|
||||||
if (dragged.type == PlacesUtils.TYPE_X_MOZ_PLACE_CONTAINER ||
|
if (dragged.type == PlacesUtils.TYPE_X_MOZ_PLACE_CONTAINER ||
|
||||||
dragged.uri.startsWith("place:")) {
|
(dragged.uri && dragged.uri.startsWith("place:")) ) {
|
||||||
let parentId = ip.itemId;
|
let parentId = ip.itemId;
|
||||||
while (parentId != PlacesUtils.placesRootId) {
|
while (parentId != PlacesUtils.placesRootId) {
|
||||||
if (dragged.concreteId == parentId || dragged.id == parentId)
|
if (dragged.concreteId == parentId || dragged.id == parentId)
|
||||||
|
Loading…
Reference in New Issue
Block a user