Bug 170820 - xlinks reached with typeaheadfind not accepting Enter or mod+Enter to perform actions. r=sicking, sr=heikki

This commit is contained in:
aaronl%netscape.com 2002-09-27 22:31:05 +00:00
Родитель 6cc2a55bb0
Коммит f454bad4b1
1 изменённых файлов: 13 добавлений и 0 удалений

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

@ -4695,6 +4695,19 @@ NS_IMETHODIMP nsEventStateManager::MoveFocusToCaret(PRBool aCanFocusDoc, PRBool
// Add better focusable test here later if necessary ...
if (nsHTMLAtoms::a == tag.get()) {
*aIsSelectionWithFocus = PR_TRUE;
}
else {
*aIsSelectionWithFocus = testContent->HasAttr(kNameSpaceID_XLink, nsHTMLAtoms::href);
if (*aIsSelectionWithFocus) {
nsAutoString xlinkType;
testContent->GetAttr(kNameSpaceID_XLink, nsHTMLAtoms::type, xlinkType);
if (!xlinkType.Equals(NS_LITERAL_STRING("simple"))) {
*aIsSelectionWithFocus = PR_FALSE; // Xlink must be type="simple"
}
}
}
if (*aIsSelectionWithFocus) {
FocusElementButNotDocument(testContent);
return NS_OK;
}