Beginning on October 25th, 2016, Persona will no longer be an option for authentication on BMO. For more details see Persona Deprecated.
Last Comment Bug 177193 - Implement the 'cursor' element and the 'cursor' attribute
: Implement the 'cursor' element and the 'cursor' attribute
Status: NEW
: dev-doc-needed
Product: Core
Classification: Components
Component: SVG (show other bugs)
: Trunk
: All All
: -- normal with 15 votes (vote)
: ---
Assigned To: Nobody; OK to take it and work on it
: Jet Villegas (:jet)
Depends on: 619617
  Show dependency treegraph
Reported: 2002-10-28 15:11 PST by chris
Modified: 2014-10-13 22:58 PDT (History)
12 users (show)
See Also:
Crash Signature:
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---

SVG Basic 1.1 vwersion of cursor test (8.13 KB, image/svg+xml)
2002-10-28 15:16 PST, chris
no flags Details
custom PNG cursor for previous attachment (268 bytes, image/png)
2002-10-28 15:18 PST, chris
no flags Details
testcase - cursor property set via CSS (240 bytes, image/svg+xml)
2005-04-19 13:59 PDT, Jonathan Watt [:jwatt]
no flags Details
testcase - cursor property set via the cursor attribute (352 bytes, image/svg+xml)
2005-04-19 14:01 PDT, Jonathan Watt [:jwatt]
no flags Details
testcase - cursor property set via both (461 bytes, image/svg+xml)
2005-04-19 14:14 PDT, Jonathan Watt [:jwatt]
no flags Details
testcase - cursor property set via CSS that references the cursor element and the image (397 bytes, image/svg+xml)
2005-04-19 14:33 PDT, Jonathan Watt [:jwatt]
no flags Details
test case - wheel (3.55 KB, image/svg+xml)
2010-12-13 13:15 PST, Jan Tošovský
no flags Details
test case - wheel (8.83 KB, application/octetstream)
2010-12-13 14:09 PST, Jan Tošovský
no flags Details

Description chris 2002-10-28 15:11:57 PST
Mozilla does well on the SVG cursor test. It implements all the built in cursors
from CSS2. It gails to implement the url() form, probably because in CSS2 this
was poorly specified in terms of conformance. SVG 1.0 fixes that with its cursor
element and link to a PNG file.

It would be excellent (and help both SVG 1.1 and CSS 2.1) to see the cursor
property fully implemented. This involves fetching the PNG file, reading the
hotspot coordinates from the cursor element, and creating a platform custom
cursor 9on those platforms that support it, or a black and white version on X
Comment 2 chris 2002-10-28 15:16:03 PST
Created attachment 104417 [details]
SVG Basic 1.1 vwersion of cursor test 

This is the SVG 1.1 Basic version of the SVG 1.0 test case.
Comment 3 chris 2002-10-28 15:18:07 PST
Created attachment 104418 [details]
custom PNG cursor for previous attachment

This is the custom cursor that the previous attachment expects to find at
Comment 4 chris 2002-10-28 15:39:35 PST
This is the MSDN documentation for custom cursors. There seems to be a single
call for this:

"You can also create a custom cursor at run time by using the CreateIconIndirect
function, which creates a cursor based on the content of an ICONINFO structure.
The GetIconInfo function fills this structure with hot spot coordinates and
information concerning the associated mask and color. "

I couldn't find the API calls for MacOS or mac OS X but notice

"Cursor utilities are fully supported in Mac OS X."
which implies it is possible. Hardware cursors seem to be 16x16, software
cursors any size.

I am looking into documentation on custom cursors for X Windows but it seems to
be limited to monochrome.
Comment 5 Sergey «Mithgol the Webmaster» Sokoloff 2002-12-27 05:06:19 PST
Mass voting for advance in CSS cursor implementation...
Comment 6 Sergey «Mithgol the Webmaster» Sokoloff 2003-01-06 10:17:46 PST
After several tests I found that cursor "url()" property is completely broken in
Mozilla 1.2.1: it is NOT ignored (as it should be before it is implemented), it
is rather interpreted as "text" instead, or at least it looks like that: a
standard I-bar:


This makes it completely impossible to render URL-defined cursors for elements
other than text - e. g., for hyperlinks. Though I once succeeded in writing
webpage both MSIE and Mozilla compatible, I had to use dirty MSIE trick @import,
placing cursor URL into CSS file which was imported by that non-standard directive.

As Jakob Nielsen once wrote in his "Designing Web Usability: The Practice of
Simplicity" (, marking external hyperlinks
(from one site to another) should mean not only placing dedicated small icons
nearby, but also changing or altering hovering cursor color and/or shape as well
- which is simple and won't need screen space, as icons do. (I can't give the
exact quote here, because I only read Russian translation of the book.) That's
why the "cursor: url();" feature has potentially extreme importance for the Web,
and bugs accompanying its implementation in Mozilla are so annoying.

Cursor: url() was implemented in Microsoft Internet Explorer since version 6.
Comment 7 Sergey «Mithgol the Webmaster» Sokoloff 2003-01-21 07:01:36 PST
I feel someone (e.g. reporter) should change bug severity to "major". Existance
of such a bug may indicate serious problem in Mozilla CSS implementation: the
browser should ignore the url(), if it cannot render it. Any unintellegible CSS
properties should be ignored. If some are not, there's an inner bug in Mozilla
CSS parser. Am I right about that?
Comment 8 Christopher Aillon (sabbatical, not receiving bugmail) 2003-05-08 03:30:12 PDT
This is a general style system bug, not confined to SVG.  It's also a dupe.
Re: comment 6, see bug 77974.

*** This bug has been marked as a duplicate of 38447 ***
Comment 9 chris 2003-05-08 06:02:57 PDT
This has substantial overlap with, but is not a duplicate of, the general 
style cursor bug. SVG also has a cursor element, which needs to be implemented 
to fully resolve this bug (though it can of course be used from non-SVG 
namespaces also as it is indirected through the style system.
Comment 10 Takeshi Kurosawa 2005-04-19 05:22:31 PDT
This bug is not RESOLVED. 
The summary should be 'Implement svg:cursor' ? 
Comment 11 Jonathan Watt [:jwatt] 2005-04-19 13:59:46 PDT
Created attachment 181198 [details]
testcase - cursor property set via CSS

This works in Mozilla, but not in ASV.
Comment 12 Jonathan Watt [:jwatt] 2005-04-19 14:01:17 PDT
Created attachment 181199 [details]
testcase - cursor property set via the cursor attribute

This works in ASV, but not in Mozilla.
Comment 13 Jonathan Watt [:jwatt] 2005-04-19 14:14:26 PDT
Created attachment 181202 [details]
testcase - cursor property set via both

This works in Mozilla, but not in ASV. I was hoping this would work around our
lack of support for the cursor element and attribute, and enable custom cursors
to work in both Mozilla and ASV. Unfortunately, it doesn't work. ASV6 preview
release overrides the cursor attribute in the markup with the CSS, so things
fail since it only allows custom cursors to be set via a reference to a cursor
element. Not by direct reference to the image that the cursor element
Comment 14 Jonathan Watt [:jwatt] 2005-04-19 14:33:48 PDT
Created attachment 181204 [details]
testcase - cursor property set via CSS that references the cursor element and the image

This works in both Mozilla and ASV. If CSS is used to reference the cursor
element and reference the image directly, things work nicely. Note that the
cursor element has to be referenced before the image, or ASV doesn't like it.
Comment 15 Jonathan Watt [:jwatt] 2005-04-19 14:48:42 PDT
Reopening. As noted in comment 9 and comment 10, there is still work to do here.

For the record, ASV3 doesn't support custom cursors at all.
Comment 16 John Drinkwater (:beta) 2008-03-27 13:25:13 PDT
Any updates with regard to cursor="" attribute support in Gecko 1.9?
Comment 17 Jonathan Watt [:jwatt] 2008-03-28 00:19:17 PDT
It will not be in 1.9. You can still get custom cursors though. See this file (and the comments in it):
Comment 18 Jan Tošovský 2010-12-13 13:15:37 PST
Created attachment 497292 [details]
test case - wheel

When 'two fallback' cursors are specified, only the last cursor, standard one, is used (FF4b7/Win7/64bit). Maybe I use wrong syntax, but it is Ok for Chrome.
   <cursor id="hand">
      <path ... />
   <cursor id="hand_raster" x="10" y="9" xlink:href="hand.png"/>
<g cursor="url('#hand'), url('#hand_raster'), pointer;">
Comment 19 Jan Tošovský 2010-12-13 14:09:32 PST
Created attachment 497300 [details]
test case - wheel

There were missing resources so all the stuff is provided as the zip file now.
Comment 20 Jonathan Watt [:jwatt] 2010-12-15 21:49:06 PST
My current plan is to WONTFIX this bug in favor of bug 619617.
Comment 21 Jonathan Watt [:jwatt] 2010-12-15 21:53:46 PST
The proposal in bug 619617 seems better to me because it's much lighter-weight, since in the common case it would only requires a property to be added to the SVG fragment that's to be used as a cursor image, instead of requiring a whole intermediary <cursor> element to be created. In the case of using a raster image, it would still be possible to use an <image> tag and specify the 'hot-spot' property on that.
Comment 22 Robert Longson 2010-12-16 09:12:47 PST
You can now have SVG cursors too as long as you use just CSS to specify them and avoid the cursor element. See

Note You need to log in before you can comment on or make changes to this bug.