Skip to main content

Bug Tracker

Side navigation

#14466 closed bug (cantfix)

Opened October 19, 2013 03:33PM UTC

Closed October 21, 2013 06:35PM UTC

Reading cursor css doesn't give back the custom cursor hotspot coords (chrome)

Reported by: perroazul64@gmail.com Owned by: perroazul64@gmail.com
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/

Attachments (0)
Change History (3)

Changed October 21, 2013 03:19PM UTC by dmethvin comment:1

owner: → perroazul64@gmail.com
status: newpending

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?

Changed October 21, 2013 06:06PM UTC by urraka <perroazul64@gmail.com> comment:2

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.

Changed October 21, 2013 06:35PM UTC by dmethvin comment:3

resolution: → cantfix
status: pendingclosed

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.