зеркало из https://github.com/mozilla/pjs.git
Bug 170820 - xlinks reached with typeaheadfind not accepting Enter or mod+Enter to perform actions. r=sicking, sr=heikki
This commit is contained in:
Родитель
6cc2a55bb0
Коммит
f454bad4b1
|
@ -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;
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче