mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-12 00:50:40 +00:00
prevent XBL forms from being dragged, quiet dragging operations. a=ben@netscape.com
This commit is contained in:
parent
b42554e726
commit
ea4b450e44
@ -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;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user