Opened 9 years ago
Closed 9 years ago
#14466 closed bug (cantfix)
Reading cursor css doesn't give back the custom cursor hotspot coords (chrome)
Reported by: | Owned by: | ||
---|---|---|---|
Priority: | undecided | Milestone: | None |
Component: | unfiled | Version: | 1.10.2 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
I set an element's cursor css with a custom image and coords. When I read that css with $(element).css("cursor") the coords are not there. This is happening on chrome. Reading element.style.cursor gives the expected coords.
Test case: http://jsfiddle.net/ym4Q4/
Change History (3)
comment:1 Changed 9 years ago by
Owner: | set to [email protected]… |
---|---|
Status: | new → pending |
comment:2 Changed 9 years ago by
These seem to be the relevant specs..
CSS3: http://www.w3.org/TR/css3-ui/#cursor CSS2.1: http://www.w3.org/TR/CSS2/ui.html#cursor-props
In both cases it says "Computed value: as specified, except with any relative URLs converted to absolute", although CSS2.1 doesn't seem to support custom coords.
Anyway, I see that there's not much consistency, browsers just seem to forget the X Y values when reading the cursor style or not support a custom URL at all.
comment:3 Changed 9 years ago by
Resolution: | → cantfix |
---|---|
Status: | pending → closed |
This doesn't look like something we can fix, the browser needs to support the CSS3 syntax and implement its behavior. For example, in IE9 the declaration with an x y
is invalid and replaced with auto
. So there isn't enough information left for us to do a cross-browser solution in either 1.x or 2.x.
We use
window.getComputedStyle
and it doesn't return the coords: http://jsfiddle.net/ym4Q4/1/Only Firefox echoes back what you entered, IE11, Chrome, and Safari 5.1 don't but have different results. It doesn't look like cursor URLs are very well supported at the moment, not much we can do about that. Can you provide a spec reference for this?