A small bug that was brought to my attention recently. When using the `:active` pseudo-class to change the mouse cursor for a canvas element, the cursor will change to the value specified by the `cursor` style while the mouse is pressed over the element. However, if one or more siblings contain text, the value of `cursor` is overridden and the text selection cursor is shown instead (indicating a value of "text"). The bug manifests whether the siblings follow or precede the <canvas> element, and even when the TextNode is nested several layers (haven't tested large depths).
Created attachment 180043 [details] Test case Hold the mouse down over the canvas. The cursor should remain w-resize, but changes to text.
I can confirm this bug; I've tested on Firefox, Safari and Chrome, and Safari and Chrome exhibit the behavior described by Andy. canvas { /* other properties here */ cursor: crosshair; } canvas.dragging, canvas:active, canvas:focus { cursor: crosshair; } During the dragging motion, the cursor changes to the text selection cursor despite the CSS properties (shown) defined on the canvas.
I tried on webkit r158108 to reproduce the bug, but couldn't. Could you please verify it still exist or not.
(In reply to comment #3) > I tried on webkit r158108 to reproduce the bug, but couldn't. Could you please verify it still exist or not. It looks like the bug has been fixed, not sure exactly when this happened, though.