Fix for PDT+ bug #18595. r=saari.

This commit is contained in:
hyatt%netscape.com 2000-02-18 08:05:56 +00:00
parent 3ed534b000
commit 70ef052747

View File

@ -126,6 +126,9 @@ nsMenuBarFrame::Init(nsIPresContext* aPresContext,
target->AddEventListener("keydown", (nsIDOMKeyListener*)mMenuBarListener, PR_FALSE);
target->AddEventListener("keyup", (nsIDOMKeyListener*)mMenuBarListener, PR_FALSE);
target->AddEventListener("mousedown", (nsIDOMMouseListener*)mMenuBarListener, PR_FALSE);
target->AddEventListener("blur", (nsIDOMFocusListener*)mMenuBarListener, PR_TRUE);
return rv;
}
@ -608,6 +611,9 @@ nsMenuBarFrame::Destroy(nsIPresContext* aPresContext)
mTarget->RemoveEventListener("keydown", (nsIDOMKeyListener*)mMenuBarListener, PR_FALSE);
mTarget->RemoveEventListener("keyup", (nsIDOMKeyListener*)mMenuBarListener, PR_FALSE);
mTarget->RemoveEventListener("mousedown", (nsIDOMMouseListener*)mMenuBarListener, PR_FALSE);
mTarget->RemoveEventListener("blur", (nsIDOMFocusListener*)mMenuBarListener, PR_TRUE);
NS_IF_RELEASE(mMenuBarListener);
return nsToolbarFrame::Destroy(aPresContext);