зеркало из https://github.com/mozilla/pjs.git
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:
Родитель
bd1b3151b8
Коммит
4a055a96a9
|
@ -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:" ||
|
||||||
|
|
Загрузка…
Ссылка в новой задаче