Fix for bug 386189 (Cursor navigation by keyboard (arrow keys) does not work on designMode (including composer)). r/sr=jst

This commit is contained in:
peterv%propagandism.org 2007-07-18 10:24:37 +00:00
Родитель 86369fca35
Коммит a38228c62e
1 изменённых файлов: 11 добавлений и 0 удалений

Просмотреть файл

@ -262,6 +262,17 @@ nsFocusController::GetControllers(nsIControllers** aResult)
do_QueryInterface(mCurrentElement); do_QueryInterface(mCurrentElement);
if (htmlInputElement) if (htmlInputElement)
return htmlInputElement->GetControllers(aResult); return htmlInputElement->GetControllers(aResult);
nsCOMPtr<nsIContent> content = do_QueryInterface(mCurrentElement);
if (content && content->IsEditable()) {
// Move up to the window.
nsCOMPtr<nsIDOMDocument> domDoc;
mCurrentElement->GetOwnerDocument(getter_AddRefs(domDoc));
nsCOMPtr<nsIDOMWindowInternal> domWindow =
do_QueryInterface(GetWindowFromDocument(domDoc));
if (domWindow)
return domWindow->GetControllers(aResult);
}
} }
else if (mCurrentWindow) { else if (mCurrentWindow) {
nsCOMPtr<nsIDOMWindowInternal> domWindow = nsCOMPtr<nsIDOMWindowInternal> domWindow =