Open
Bug 847320
Opened 13 years ago
Updated 3 years ago
Default cursor style for anchor is "pointer". Should be "auto".
Categories
(Core :: CSS Parsing and Computation, defect)
Tracking
()
UNCONFIRMED
People
(Reporter: mb, Unassigned)
References
Details
(Keywords: testcase)
Attachments
(1 file)
|
584 bytes,
text/html
|
Details |
User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:19.0) Gecko/20100101 Firefox/19.0
Build ID: 20130215130331
Steps to reproduce:
Created an anchor.
Read back cursor style:
cursorStyle = document.defaultView.getComputedStyle(anchorElm, null).getPropertyValue("cursor");
Actual results:
cursorStyle is now = "pointer".
Expected results:
cursorStyle should have been "auto".
| Reporter | ||
Updated•13 years ago
|
| Reporter | ||
Comment 1•13 years ago
|
||
When setting cursor style for anchors to "auto", visual cursor style is always an arrow. It should be a hand.
Setting cursor style for anchors to "pointer", visual cursor style is hand. This is actually the behaviour I expected for "auto".
| Reporter | ||
Updated•13 years ago
|
Summary: Default cursor style for anchor is "pointer". → Default cursor style for anchor is "pointer". Should be "auto".
Provide a minimal testcase, please (html file)
Keywords: css2 → testcase-wanted
Whiteboard: css, anchor, style, cursor, default
| Reporter | ||
Comment 3•13 years ago
|
||
Attachment #720769 -
Attachment mime type: text/plain → text/html
Keywords: testcase-wanted → testcase
It's set to "pointer" in the UA stylesheet (see resource://gre-resources/ua.css).
(In reply to Michael Bruus from comment #1)
> When setting cursor style for anchors to "auto", visual cursor style is
> always an arrow. It should be a hand.
I get a "text" cursor (I-beam). Example:
data:text/html,<a href="javascript:;" style="cursor:auto">My anchor</a>
So as you say, it looks as though the "auto" cursor style for links is not a pointer, which is why it has to be explicitly set to pointer in the UA stylesheet.
| Reporter | ||
Comment 5•13 years ago
|
||
According to this:
https://developer.mozilla.org/en-US/docs/CSS/cursor
Default value for all elements should be auto.
Whereby "The browser determines the cursor to display based on the current context."
So even though the default behavior when hovering an anchor is what you'd expect (hand), setting cursor style to "auto" ought to get you the default behavior - which it doesn't.
I see that the default setting in the UA stylesheet is "pointer" - thus FF does what it's told to - and this behaviour is per se not a bug.
Updated•12 years ago
|
Component: Untriaged → CSS Parsing and Computation
Product: Firefox → Core
This bug really depends on bug 88688, which was resolved INVALID back in 2004.
I think consideration should be given to reopening and fixing bug 88688 though, which would in turn fix this bug. Other browsers I've tested, including Google Chrome, do the sensible thing (IMO) and make the 'auto' cursor for links a pointer.
Comment 7•12 years ago
|
||
I ran into this issue as well.
My use case consists in faking a clickable page background surrounding the page main content.
To do so I set :
body { cursor: pointer }
but then, because of style inheritance, I need to put all children back to their default cursor :
body * { cursor: auto }
It works like a charm on other browsers but set back link elements style to the text cursor instead of the pointer one which is in my opinion counterintuituive.
Updated•3 years ago
|
Severity: minor → S4
You need to log in
before you can comment on or make changes to this bug.
Description
•