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 =