Fix double selection problem in trees. r=ben

This commit is contained in:
hyatt%netscape.com 2000-09-05 07:09:14 +00:00
parent 4c99aed8c0
commit b03ae07bef
2 changed files with 12 additions and 12 deletions

View File

@ -109,13 +109,13 @@ NS_IMPL_ISUPPORTS1(nsXBLPrototypeHandler, nsIXBLPrototypeHandler)
NS_IMETHODIMP
nsXBLPrototypeHandler::EventMatched(nsIDOMEvent* aEvent, PRBool* aResult)
{
nsCOMPtr<nsIDOMKeyEvent> key(do_QueryInterface(aEvent));
if (key)
*aResult = KeyEventMatched(key);
nsCOMPtr<nsIDOMMouseEvent> mouse(do_QueryInterface(aEvent));
if (mouse)
*aResult = MouseEventMatched(mouse);
else {
nsCOMPtr<nsIDOMMouseEvent> mouse(do_QueryInterface(aEvent));
if (mouse)
*aResult = MouseEventMatched(mouse);
nsCOMPtr<nsIDOMKeyEvent> key(do_QueryInterface(aEvent));
if (key)
*aResult = KeyEventMatched(key);
else *aResult = PR_TRUE;
}

View File

@ -109,13 +109,13 @@ NS_IMPL_ISUPPORTS1(nsXBLPrototypeHandler, nsIXBLPrototypeHandler)
NS_IMETHODIMP
nsXBLPrototypeHandler::EventMatched(nsIDOMEvent* aEvent, PRBool* aResult)
{
nsCOMPtr<nsIDOMKeyEvent> key(do_QueryInterface(aEvent));
if (key)
*aResult = KeyEventMatched(key);
nsCOMPtr<nsIDOMMouseEvent> mouse(do_QueryInterface(aEvent));
if (mouse)
*aResult = MouseEventMatched(mouse);
else {
nsCOMPtr<nsIDOMMouseEvent> mouse(do_QueryInterface(aEvent));
if (mouse)
*aResult = MouseEventMatched(mouse);
nsCOMPtr<nsIDOMKeyEvent> key(do_QueryInterface(aEvent));
if (key)
*aResult = KeyEventMatched(key);
else *aResult = PR_TRUE;
}