this was supposed to be checked in for someones pdt+ bug. this alters the view's destructor to remove itself from the viewmanagers mouse capture code. r= hyatt the bug had to do with OnClick on a view causing a web page reload. this became a must fix when joki checked in his event changes.

This commit is contained in:
mjudge%netscape.com 2000-06-01 00:38:57 +00:00
parent a741dd03f7
commit 7da12ff3bc

View File

@ -116,7 +116,7 @@ nsView :: ~nsView()
{
nsIView *rootView;
mViewManager->GetRootView(rootView);
if (nsnull != rootView)
{
if (rootView == this)
@ -137,6 +137,14 @@ nsView :: ~nsView()
mParent->RemoveChild(this);
}
nsIView* grabbingView; //check to see if we are capturing!!!
mViewManager->GetMouseEventGrabber(grabbingView);
if (grabbingView == this)
{
PRBool boolResult;//not used
mViewManager->GrabMouseEvents(nsnull,boolResult);
}
mViewManager = nsnull;
}
else if (nsnull != mParent)