Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

cursor:auto - how it defined

2 views
Skip to first unread message

rvj

unread,
Sep 24, 2008, 7:45:06 AM9/24/08
to
Im finding it difficult to locate an explanation/definition of default
mappings for cursor:auto style

- are they defined in a CSS sheet or hardcoded


The official definition says cursor:auto is determined by the browser
context

- but exactly what defines a distinct context ?

As far as I can see only two types are observable

1. cursor over text resulting in I-beam
2. cursor over anything else resulting in default cursor (arrow)

Suggested reading


L. David Baron

unread,
Sep 24, 2008, 10:10:57 AM9/24/08
to rvj, dev-te...@lists.mozilla.org
On Wednesday 2008-09-24 12:45 +0100, rvj wrote:
> Im finding it difficult to locate an explanation/definition of default
> mappings for cursor:auto style
>
> - are they defined in a CSS sheet or hardcoded
>
>
> The official definition says cursor:auto is determined by the browser
> context

The official definition is very vague.

The only reason to have such a value at all is to have the behavior
where a cursor is a pointer when not over text and an I-beam cursor
when over text. Anything else can be done in the UA style sheet,
and I think should be.

> As far as I can see only two types are observable
>
> 1. cursor over text resulting in I-beam
> 2. cursor over anything else resulting in default cursor (arrow)

Thus, what we implement for 'cursor: auto' is exactly the
distinction you give, and nothing else. I think that's what the
spec should have said.

-David

--
L. David Baron http://dbaron.org/
Mozilla Corporation http://www.mozilla.com/

rvj

unread,
Sep 26, 2008, 5:02:08 AM9/26/08
to
Many thanks

... do you know if anyone has found a workaround that allows a document
script to determine WHICH icon is actually visible? I would like to know
when the cursor is over text.

********************************************************************************************

Presumably in an html environment the tagName would provide a good clue as
it indicates the type of object (<img> <h1> etc ). However some of these
assumptions are not very intuitive such as <body><div>. What Im not sure
about whether it is possible to make similar assumptions for other kinds of
object eg flash, etc

I assume that the cursor:auto style relate to the browser's context menus
in some way - or are context menus complely
independent of the current object

For example if it were possible to determine the context menu type , it
might provide a better clue because there are relatively few context menus
in a document.

********************************************************************************************

.. so one final question ..

is there a scriptable way of determining the context menu type (id)
associated with the current object in a mouseover event ?


PP thanks for any pointers !!


"L. David Baron" <dba...@dbaron.org> wrote in message
news:mailman.152.12222654...@lists.mozilla.org...

rvj

unread,
Sep 26, 2008, 6:22:53 AM9/26/08
to
PPS I guess the simplest solution is to check if the object has a
textvalue/#text property!


"rvj" <r...@rolemodels.net> wrote in message
news:KNydnf4mtvqSOEHV...@mozilla.org...

Laurent

unread,
Oct 6, 2008, 2:17:07 PM10/6/08
to

Have you been able to resolve this problem of identifying the actual
cursor shape when getComputedStyle returns 'auto'?
I've tried using a list of known tagNames that would normally show
'text' (e.g. B, PRE, STRONG, CODE), but it's not reliable.
For example, a PRE can include line breaks or empty spaces around the
text it might display, and the cursor is 'default'.
How can we know that there's text underneat the current position?
I couldn't get textvalue or text working.
Laurent.

rvj

unread,
Oct 28, 2008, 4:16:41 PM10/28/08
to
sorry - I gave up with that approach ( for the time being )


"Laurent" <lde...@gmail.com> wrote in message
news:dd0454bc-1023-46eb...@25g2000prz.googlegroups.com...

0 new messages