From f930f65148baa97cd87e57a1f2ebc4e5b1847291 Mon Sep 17 00:00:00 2001 From: "mjudge%netscape.com" Date: Thu, 1 Jun 2000 00:38:57 +0000 Subject: [PATCH] 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 --- mozilla/view/src/nsView.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/mozilla/view/src/nsView.cpp b/mozilla/view/src/nsView.cpp index 94f6c4f961c..b92d43c509f 100644 --- a/mozilla/view/src/nsView.cpp +++ b/mozilla/view/src/nsView.cpp @@ -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)