W3C home > Mailing lists > Public > www-style@w3.org > September 2015

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

From: Florian Rivoal <florian@rivoal.net>
Date: Mon, 31 Aug 2015 14:00:39 +0900
Cc: www-style@w3.org
Message-Id: <EA4C348A-D215-4B60-B01F-4318A749B22C@rivoal.net>
To: Chris Rebert <csswg@rebertia.com>

> 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

This archive was generated by hypermail 2.4.0 : Friday, 25 March 2022 10:08:56 UTC