diff --git a/mailnews/addrbook/resources/content/abDragDrop.js b/mailnews/addrbook/resources/content/abDragDrop.js index 0c9108c30243..9ced550fccc6 100644 --- a/mailnews/addrbook/resources/content/abDragDrop.js +++ b/mailnews/addrbook/resources/content/abDragDrop.js @@ -81,6 +81,10 @@ function BeginDragResultTree(event) // if the click is on the tree proper, ignore it. We only care about clicks on items. + if (event.target.localName != "treecell" && + event.target.localName != "treeitem") + return false; + var tree = resultsTree; if ( event.target == tree ) return(true); // continue propagating the event @@ -138,6 +142,10 @@ function DropOnDirectoryTree(event) { debugDump("DropOnTree\n"); + if (event.target.localName != "treecell" && + event.target.localName != "treeitem") + return false; + var RDF = GetRDFService(); if (!RDF) return(false); diff --git a/mailnews/addrbook/resources/content/abResultsTreeOverlay.xul b/mailnews/addrbook/resources/content/abResultsTreeOverlay.xul index 0562838bf220..8f0752feaf40 100644 --- a/mailnews/addrbook/resources/content/abResultsTreeOverlay.xul +++ b/mailnews/addrbook/resources/content/abResultsTreeOverlay.xul @@ -31,7 +31,7 @@ Rights Reserved. datasources="rdf:addressdirectory rdf:addresscard" onselect="top.ResultsPaneSelectionChange(); document.commandDispatcher.updateCommands('tree-select');" onblur="goOnEvent(this,'blur')" - onclick="if ( event.detail == 2 ) top.AbEditCard();" + onclick="clickResultsTree(event);" containment="http://home.netscape.com/NC-rdf#CardChild" allownegativeassertions="false" coalesceduplicatearcs="false" diff --git a/mailnews/addrbook/resources/content/addressbook.js b/mailnews/addrbook/resources/content/addressbook.js index 1587f972357a..fc204845bd1a 100644 --- a/mailnews/addrbook/resources/content/addressbook.js +++ b/mailnews/addrbook/resources/content/addressbook.js @@ -277,5 +277,12 @@ function AbDeleteDirectory() top.addressbook.deleteAddressBooks(dirTree.database, parentArray, dirTree.selectedItems); } +function clickResultsTree(event) +{ + if (event.target.localName != "treecell" && + event.target.localName != "treeitem") + return; + if ( event.detail == 2 ) top.AbEditCard(); +}