Links with empty href don't get a focus outline when they are focused

VERIFIED FIXED

Status

()

Core
Keyboard: Navigation
VERIFIED FIXED
14 years ago
14 years ago

People

(Reporter: Martijn Wargers (zombie), Assigned: bz)

Tracking

({regression, testcase})

Trunk
x86
Windows XP
regression, testcase
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(3 attachments)

(Reporter)

Description

14 years ago
User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8a4) Gecko/20040925 Firefox/0.9.1+
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8a4) Gecko/20040925 Firefox/0.9.1+

A link like this:
<a href="">Link</a>
doesn't get a focus outline anymore, when you focus it.

This is a regression.
This used to work in:
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8a3) Gecko/20040724
Firefox/0.9.1+
But it doesn't work anymore as of:
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8a3) Gecko/20040726
Firefox/0.9.1+

Also when you tab through to the link, normally you get to be shown the link
href in the status bar. This is also not happening with the empty href testcase.
This might sound a bit strange, but an empty href 'gets' automatically the
current location.

Reproducible: Always
Steps to Reproduce:
1.
2.
3.
(Reporter)

Comment 1

14 years ago
Created attachment 160187 [details]
Testcase
(Reporter)

Comment 2

14 years ago
It could be a regression from bug 250006, but I'm not sure.
Keywords: regression, testcase
(Reporter)

Comment 3

14 years ago
I've tried adding this style rule to the testcase:
<style>a[href=""]:focus{-moz-outline:1px dotted black;}
</style>
But the style rule somehow doesn't get applied (no focus outline when focusing
the link) 
This is absolutely a regression from bug 250006.   The check
nsHTMLAnchorElement::IsFocusable does for an empty URI is totally bogus.  It
should be getting the HrefURI and checking whether that's null.
Oh, and that bug broke tabbing to and focusing of XLinks too.
Attachment #160598 - Flags: superreview?(jst)
Attachment #160598 - Flags: review?(aaronleventhal)

Updated

14 years ago
Attachment #160598 - Flags: review?(aaronleventhal) → review+
Comment on attachment 160598 [details] [diff] [review]
Proposed patch

sr=jst
Attachment #160598 - Flags: superreview?(jst) → superreview+
Assignee: aaronleventhal → bzbarsky
Fixed.
Status: NEW → RESOLVED
Last Resolved: 14 years ago
Resolution: --- → FIXED
Note:  When I checked this in, two bits of the bug 263200 patch made it in too
(the nsHTMLAnchorElement.cpp and nsXMLElement.cpp bits).
Verified FIXED; focus ring is now present in build 2004-11-17-04 using testcase
https://bugzilla.mozilla.org/attachment.cgi?id=160187&action=view on Windows XP
with Seamonkey trunk.
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.