W3C home > Mailing lists > Public > www-style@w3.org > June 2013

Re: [cssom-view][css-ui] elementsFromPoint() and pointer-events:paint-order

From: Elliott Sprehn <esprehn@gmail.com>
Date: Mon, 24 Jun 2013 09:53:09 -0700
Message-ID: <CAPJYB1hmwvhrtVCJ9a9L-9zsrifAgoGf=-RBhLsnh2W-93zctg@mail.gmail.com>
To: "Tab Atkins Jr." <jackalmage@gmail.com>
Cc: Alan Stearns <stearns@adobe.com>, Simon Pieters <simonp@opera.com>, W3C WWW Style <www-style@w3.org>, "glenn.adams@cox.com" <glenn.adams@cox.com>, Ian Hickson <ian@hixie.ch>, Simon Fraser <smfr@me.com>
On Mon, Jun 24, 2013 at 8:58 AM, Tab Atkins Jr. <jackalmage@gmail.com>wrote:

> On Mon, Jun 24, 2013 at 7:50 AM, Alan Stearns <stearns@adobe.com> wrote:
> > On 6/24/13 4:29 AM, "Simon Pieters" <simonp@opera.com> wrote:
> >
> > Thanks,>>> The NodeList returned from elementsFromPoint(x, y) should be
> identical
> >>>to
> >>> a list constructed by iterating over these steps:
> >>>
> >>> 1. Call elementFromPoint(x, y) and add any non-null result to the list.
> >>> 2. If the result not null nor the root element, remove that element and
> >>>go
> >>> to step 1.
> >>That would be incorrect, since elementFromPoint uses hit testing.
> >
> > Fair enough. But then I'd add a note to parallel the note above,
> something
> > like:
> >
> > ---
> > The elementsFromPoint() method will return all painted elements at the
> > coordinates, even those excluded from being a target for hit testing by
> > using the 'pointer-events' CSS property.
> > ---
>
> Is that an intentional difference?  It seems weird for
> elementFromPoint and elementsFromPoint to use different methods to
> determine what's returned; in particular, it seems weird that if the
> top-most element has pointer-events:none, it'll be skipped by the
> former and returned as the first result by the latter.
>

Yeah, I'd hope they would behave identically except that
elementsFromPoint() would return all the elements as if I had shot a line
through the page along the z-axis.

- E
Received on Monday, 24 June 2013 16:54:17 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:39:12 UTC