110145 - Using the mouse wheel crashes when there's no target content. Scroll the focused content when the cursor is outside the window. r=ben sr=hewitt

This commit is contained in:
blakeross%telocity.com 2001-11-16 04:52:16 +00:00
parent 72df08441d
commit 28b78a91cc

View File

@ -1218,7 +1218,9 @@ nsEventStateManager::DoWheelScroll(nsIPresContext* aPresContext,
{
nsCOMPtr<nsIContent> targetContent;
aTargetFrame->GetContent(getter_AddRefs(targetContent));
if (!targetContent)
GetFocusedContent(getter_AddRefs(targetContent));
if (!targetContent) return NS_OK;
nsCOMPtr<nsIDocument> targetDoc;
targetContent->GetDocument(*getter_AddRefs(targetDoc));
if (!targetDoc) return NS_OK;