Google Groups unterstützt keine neuen Usenet-Beiträge oder ‑Abos mehr. Bisherige Inhalte sind weiterhin sichtbar.

cursor:auto - how it defined

2 Aufrufe
Direkt zur ersten ungelesenen Nachricht

rvj

ungelesen,
24.09.2008, 07:45:0624.09.08
an
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

ungelesen,
24.09.2008, 10:10:5724.09.08
an 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

ungelesen,
26.09.2008, 05:02:0826.09.08
an
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

ungelesen,
26.09.2008, 06:22:5326.09.08
an
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

ungelesen,
06.10.2008, 14:17:0706.10.08
an

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

ungelesen,
28.10.2008, 16:16:4128.10.08
an
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 neue Nachrichten