prevent XBL forms from being dragged, quiet dragging operations. a=ben@netscape.com

This commit is contained in:
hyatt%netscape.com 2000-12-10 09:14:03 +00:00
Родитель 22b34b5871
Коммит e8c99bd588
1 изменённых файлов: 7 добавлений и 1 удалений

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

@ -33,6 +33,7 @@ var contentAreaDNDObserver = {
// under the assumption that content areas won't contain
// draggable XBL, we'll ignore the drag if we're dragging XBL
// anonymous content nodes, like scrollbars, etc.
// XXX bogus
if (aEvent.target != aEvent.originalTarget)
throw Components.results.NS_ERROR_FAILURE;
@ -68,7 +69,7 @@ var contentAreaDNDObserver = {
}
else
{
dump("Dragging DOM node: <" + draggedNode.localName + ">\n");
//dump("Dragging DOM node: <" + draggedNode.localName + ">\n");
if (aEvent.altKey && findParentNode(draggedNode, 'a'))
return false;
switch (draggedNode.localName.toUpperCase())
@ -115,6 +116,11 @@ var contentAreaDNDObserver = {
dump("Couldn't normalize selection: " + ex + "\n");
}
}
else {
// Need to throw to indicate that the drag target should not
// allow drags.
throw Components.results.NS_OK;
}
break;
}
}