views:

36

answers:

1

Hi all,

Cocoa app, SnowLeopard

I have a WebView in to which I'm loading HTML (essentially for application UI purposes).

In the html, I've added:

<body onselectstart="return false" ondragstart="return false">

This prevents text from being selected, which is what I want for this job.

However, whenever the cursor is moved over any text, including disabled "button" texts, the cursor changes to the I-Beam, producing a nasty, unwanted effect.

Is there any way to change this behaviour, either in HTML or in WebKit?

Thanks for any help.

A: 

Try adding the -webkit-user-select: none; declaration to each of the selectors you don't want to be user-selectable.

Actually, if you just want to show a different cursor, use this:

#myelement {
    cursor: default;
}

This will show a regular pointer instead of the selection I-Beam.

conmulligan
Thanks for the help. Alas, this is not having any effect. (The I-Beam still appears over any text.)
SirRatty
Try using the cursor declaration above, it might be what you're looking for.
conmulligan
That did the trick! Excellent, thank you very much!
SirRatty