W3C home > Mailing lists > Public > www-style@w3.org > November 2012

Re: handling click events on :before/:after pseudo-elements

From: Elliott Sprehn <esprehn@gmail.com>
Date: Tue, 6 Nov 2012 11:45:45 -0800
Message-ID: <CAPJYB1hAUvX4PtCa9_DcVnYhNHrUjkcjhwiO73pzaVz83i-x+A@mail.gmail.com>
To: David Karger <karger@mit.edu>
Cc: www-style@w3.org
On Tue, Nov 6, 2012 at 11:31 AM, David Karger <karger@mit.edu> wrote:
> I've run into an under-specification in css that has apparently led firefox
> and chrome to choose different behaviors; either is fine, but it would be
> nice if the css specification were extended to encourage consistency.
>
> The question is: if I declare some content to be inserted via the :before or
> :after pseudo elements, how should the event model handle clicks *on* the
> inserted content?  In firefox, clicking on the pseudo-content triggers a
> click event on the element that has been styled with the pseudo content; in
> chrome, it does not (the click falls through to whatever element is "behind"
> the pseudo content).
>

Do you have an example of when this happens in WebKit? It's a bug, and
I think it's fixed with my rewrite of how we handle generated content.

- E
Received on Tuesday, 6 November 2012 19:46:53 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:21:02 GMT