Re: [css-ui] cursor property's behavior when elements overlap is ambiguous

> On 04 Aug 2015, at 02:49, Chris Rebert <csswg@rebertia.com> wrote:
> 
> Regarding the `cursor` property, the spec currently says:
> "This property specifies the type of cursor to be displayed for the
> pointing device when within the element’s border edge."
> 
> However, neither the definition of "border edge" nor the rest of the
> `cursor` section in the spec seem to provide any clarity on how to
> handle situations where multiple elements with `cursor` properties
> overlap with each other.
> 
> I think it's pretty obvious that the desired behavior is that the
> element which is highest on the z-axis should be the one whose cursor
> is displayed when elements overlap. Fortunately, all the major
> browsers seem to already implement this behavior. So I suggest that
> the spec be updated accordingly to resolve this ambiguity.
> 
> (Hat tip to Florian for noticing this in
> https://github.com/w3c/csswg-test/pull/800 )


Hi,

The CSSWG has decided to resolve this by depending on hit testing. This is a concept that unfortunately lacks a specification at the moment, but at least this
guarantees that whichever element would get the click is the one that determines the cursor's appearance, which is sufficient to support the test case you submitted.

 - Florian

Received on Wednesday, 2 September 2015 10:41:09 UTC