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)