bug 53403, dragging bookmark folder into child folder deletes folder, r=ben, sr=alecf

This commit is contained in:
morse%netscape.com 2001-04-26 07:49:16 +00:00
Родитель 32a0e534c9
Коммит a16cd855af
1 изменённых файлов: 9 добавлений и 0 удалений

Просмотреть файл

@ -278,6 +278,15 @@ var bookmarksDNDObserver = {
rContainer == rSource || !isContainer)
continue;
// Prevent dropping node into one of its own subfolders
do {
var targetAncestor = NODE_ID(dropItem);
dropItem = dropItem.parentNode;
} while (targetAncestor != "NC:BookmarksRoot" && targetAncestor != sourceID);
if (targetAncestor == sourceID) {
continue;
}
// XXX if any of the following fails, the nodes are gone for good!
const kDSIID = Components.interfaces.nsIDragService;
const kCopyAction = kDSIID.DRAGDROP_ACTION_COPY + kDSIID.DRAGDROP_ACTION_LINK;