Bug 338772 Show can't-drop indicator when dragging PTF bookmarks such that they won't move when dropped

r+sr=jag
This commit is contained in:
cst%yecc.com 2007-05-05 04:37:21 +00:00
Родитель bd1b3151b8
Коммит 4a055a96a9
1 изменённых файлов: 11 добавлений и 0 удалений

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

@ -473,6 +473,17 @@ var BookmarksMenuDNDObserver = {
canDrop: function (aEvent, aDragSession) canDrop: function (aEvent, aDragSession)
{ {
var target = aEvent.target; var target = aEvent.target;
if (aDragSession) { // this function gets its API abused by onDragStart
var orientation = BookmarksMenu.getBTOrientation(aEvent, target);
if (target == aDragSession.sourceNode ||
(target == aDragSession.sourceNode.previousSibling &&
orientation == BookmarksUtils.DROP_AFTER) ||
(target == aDragSession.sourceNode.nextSibling &&
orientation == BookmarksUtils.DROP_BEFORE))
return false;
}
return BookmarksMenu.isBTBookmark(target.id) && return BookmarksMenu.isBTBookmark(target.id) &&
target.id != "NC:SystemBookmarksStaticRoot" && target.id != "NC:SystemBookmarksStaticRoot" &&
target.id.substring(0,5) != "find:" || target.id.substring(0,5) != "find:" ||