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.

git-svn-id: svn://10.0.0.236/trunk@71210 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
mjudge%netscape.com 2000-06-01 00:38:57 +00:00
parent feca177c8b
commit f930f65148

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)