Bug 105355 - `cursor` value ignored for canvas:active whose siblings are or contain text nodes
Summary: `cursor` value ignored for canvas:active whose siblings are or contain text n...
Status: RESOLVED WORKSFORME
Alias: None
Product: WebKit
Classification: Unclassified
Component: Canvas (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Minor
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-12-18 15:13 PST by Andy E
Modified: 2014-01-28 10:37 PST (History)
2 users (show)

See Also:


Attachments
Test case (349 bytes, text/html)
2012-12-18 15:14 PST, Andy E
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Andy E 2012-12-18 15:13:46 PST
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).
Comment 1 Andy E 2012-12-18 15:14:54 PST
Created attachment 180043 [details]
Test case

Hold the mouse down over the canvas.  The cursor should remain w-resize, but changes to text.
Comment 2 Elisabeth 2013-03-25 16:23:50 PDT
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.
Comment 3 Abhijeet Kandalkar 2013-10-31 08:25:54 PDT
I tried on webkit r158108 to reproduce the bug, but couldn't. Could you please verify it still exist or not.
Comment 4 Andy E 2014-01-28 00:36:44 PST
(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.