Bug 338772 Show can't-drop indicator when dragging PTF bookmarks such that they won't move when dropped
r+sr=jag git-svn-id: svn://10.0.0.236/trunk@209228 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
parent
34b62b7d9c
commit
fb039cfcd1
@ -473,6 +473,17 @@ var BookmarksMenuDNDObserver = {
|
||||
canDrop: function (aEvent, aDragSession)
|
||||
{
|
||||
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) &&
|
||||
target.id != "NC:SystemBookmarksStaticRoot" &&
|
||||
target.id.substring(0,5) != "find:" ||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user