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

git-svn-id: svn://10.0.0.236/trunk@83460 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
hyatt%netscape.com
2000-12-10 09:14:03 +00:00
parent bbf6c30c33
commit f7655658a5

View File

@@ -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;
}
}