From fab918d441fb17b3fe74cdfdcf329a1c1fa2de61 Mon Sep 17 00:00:00 2001 From: "rods%netscape.com" Date: Mon, 17 Aug 1998 16:43:07 +0000 Subject: [PATCH] Add SetFocus so keyboard navigation works. git-svn-id: svn://10.0.0.236/trunk@8093 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/webshell/src/nsDocumentViewer.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/mozilla/webshell/src/nsDocumentViewer.cpp b/mozilla/webshell/src/nsDocumentViewer.cpp index 6545bc15ec0..6a34b174093 100644 --- a/mozilla/webshell/src/nsDocumentViewer.cpp +++ b/mozilla/webshell/src/nsDocumentViewer.cpp @@ -531,6 +531,11 @@ nsresult DocumentViewerImpl::MakeWindow(nsNativeWidget aNativeParent, //set frame rate to 25 fps mViewManager->SetFrameRate(25); + // This SetFocus is necessary so the Arrow Key and Page Key events + // go to the scrolled view as soon as the Window is created instead of going to + // the browser window (this enables keyboard scrolling of the document) + mWindow->SetFocus(); + return rv; }