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:
pollmann%netscape.com 2000-05-11 01:43:04 +00:00
parent aa59f2c418
commit f26fd30713
2 changed files with 14 additions and 2 deletions

View File

@ -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));

View File

@ -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));