Bug 17605: Don't tab to anchor without an href. r=harishd
git-svn-id: svn://10.0.0.236/trunk@69133 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
parent
aa59f2c418
commit
f26fd30713
@ -1810,7 +1810,13 @@ nsEventStateManager::GetNextTabbableContent(nsIContent* aRootContent, nsIFrame*
|
||||
nsCOMPtr<nsIDOMHTMLAnchorElement> nextAnchor(do_QueryInterface(child));
|
||||
if (nextAnchor)
|
||||
nextAnchor->GetTabIndex(&tabIndex);
|
||||
disabled = PR_FALSE;
|
||||
nsAutoString href;
|
||||
nextAnchor->GetAttribute(NS_ConvertASCIItoUCS2("href"), href);
|
||||
if (!href.Length()) {
|
||||
disabled = PR_TRUE; // Don't tab unless href, bug 17605
|
||||
} else {
|
||||
disabled = PR_FALSE;
|
||||
}
|
||||
}
|
||||
else if(nsHTMLAtoms::button==tag.get()) {
|
||||
nsCOMPtr<nsIDOMHTMLButtonElement> nextButton(do_QueryInterface(child));
|
||||
|
||||
@ -1810,7 +1810,13 @@ nsEventStateManager::GetNextTabbableContent(nsIContent* aRootContent, nsIFrame*
|
||||
nsCOMPtr<nsIDOMHTMLAnchorElement> nextAnchor(do_QueryInterface(child));
|
||||
if (nextAnchor)
|
||||
nextAnchor->GetTabIndex(&tabIndex);
|
||||
disabled = PR_FALSE;
|
||||
nsAutoString href;
|
||||
nextAnchor->GetAttribute(NS_ConvertASCIItoUCS2("href"), href);
|
||||
if (!href.Length()) {
|
||||
disabled = PR_TRUE; // Don't tab unless href, bug 17605
|
||||
} else {
|
||||
disabled = PR_FALSE;
|
||||
}
|
||||
}
|
||||
else if(nsHTMLAtoms::button==tag.get()) {
|
||||
nsCOMPtr<nsIDOMHTMLButtonElement> nextButton(do_QueryInterface(child));
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user