From a38228c62ef8c0cf40166e4e684231cf50f3d766 Mon Sep 17 00:00:00 2001 From: "peterv%propagandism.org" Date: Wed, 18 Jul 2007 10:24:37 +0000 Subject: [PATCH] Fix for bug 386189 (Cursor navigation by keyboard (arrow keys) does not work on designMode (including composer)). r/sr=jst --- dom/src/base/nsFocusController.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/dom/src/base/nsFocusController.cpp b/dom/src/base/nsFocusController.cpp index a7a33c71555..58610689aeb 100644 --- a/dom/src/base/nsFocusController.cpp +++ b/dom/src/base/nsFocusController.cpp @@ -262,6 +262,17 @@ nsFocusController::GetControllers(nsIControllers** aResult) do_QueryInterface(mCurrentElement); if (htmlInputElement) return htmlInputElement->GetControllers(aResult); + + nsCOMPtr content = do_QueryInterface(mCurrentElement); + if (content && content->IsEditable()) { + // Move up to the window. + nsCOMPtr domDoc; + mCurrentElement->GetOwnerDocument(getter_AddRefs(domDoc)); + nsCOMPtr domWindow = + do_QueryInterface(GetWindowFromDocument(domDoc)); + if (domWindow) + return domWindow->GetControllers(aResult); + } } else if (mCurrentWindow) { nsCOMPtr domWindow =