Closed
Bug 91186
Opened 24 years ago
Closed 24 years ago
Anchor w/no href shows hover only over padding
Categories
(Core :: CSS Parsing and Computation, defect)
Core
CSS Parsing and Computation
Tracking
()
People
(Reporter: gekacheka, Assigned: pierre)
Details
(Keywords: qawanted)
Attachments
(2 files)
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:0.9.2+)
Gecko/20010716
BuildID: 2001071604
An anchor should only change style according to :link, :hover, :active, :visited
if it is a referring link (i.e., it has an "href" attribute).
(See CSS1 sec2.1 Anchor pseudo-classes). However, Mozilla erroneously does
change style when mouse hovers over padding (but not text), and when button is
activated, on anchors with no href.
Reproducible: Always
Steps to Reproduce:
1. See attached example file.
2. Move mouse over left and right end of "no-href" anchor
3. Press button in "no-href" anchor.
Actual Results: Mouse over padding at ends of "no-href" anchor changes color of
anchor to green.
Pressing button in no-href anchor changes color to red.
Expected Results: No color changes, since this is an anchor with no href.
upped severity to minor since it can cause confusing behavior in a menu (e.g.,
if disabled items appear to be active.)
Severity: trivial → minor
Comment 3•24 years ago
|
||
:hover and :active are not anchor-only pseudo-classes. They can apply to
arbitrary elements. There is no reason to restrict application to <a> elements
with an href.
See http://www.w3.org/TR/REC-CSS2/selector.html#dynamic-pseudo-classes
as opposed to http://www.w3.org/TR/REC-CSS2/selector.html#link-pseudo-classes
Also from the CSS2 spec:
Note. In CSS1, the ':active' pseudo-class was mutually exclusive with ':link'
and ':visited'. That is no longer the case. An element can be both ':visited'
and ':active' (or ':link' and ':active') and the normal cascading rules
determine which properties apply.
Marking invalid since we're following the CSS2 spec here. Someone depending on
links with no href not going active should make a rule more like:
a[href]:active
instead of
a:active
Status: UNCONFIRMED → RESOLVED
Closed: 24 years ago
Resolution: --- → INVALID
Ok, my expectation was wrong, but there's still a problem.
In the example with no href, it only shows the hovering style/color when
hovering over the anchor padding, and not when hovering over the anchor text.
The hovering policy should be the same for hovering over padding and hovering
over the text.
See updated example.
Status: RESOLVED → UNCONFIRMED
Resolution: INVALID → ---
Summary: Anchor w/no href changes: hover over padding, active button press → Anchor w/no href shows hover only over padding
Comment 6•24 years ago
|
||
I'm fairly certain that what you're seeing there is bug 5693.
On the off chance that it's not, setting status to NEW....
In the future, please do not mutate bugs. Just file new ones for new twists on
the problem.
ccing dbaron who's been dealing with this hierarchical hover stuff.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Keywords: qawanted
OS: Windows 2000 → All
Hardware: PC → All
Assignee | ||
Comment 7•24 years ago
|
||
Status: NEW → RESOLVED
Closed: 24 years ago → 24 years ago
Resolution: --- → DUPLICATE
You need to log in
before you can comment on or make changes to this bug.
Description
•