W3C home > Mailing lists > Public > whatwg@whatwg.org > August 2013

Re: [whatwg] Should <video controls> generate click events?

From: Ian Hickson <ian@hixie.ch>
Date: Tue, 6 Aug 2013 21:30:43 +0000 (UTC)
To: Philip J├Ągenstedt <philipj@opera.com>
Message-ID: <alpine.DEB.2.00.1308062124340.9685@ps20323.dreamhostps.com>
Cc: whatwg@whatwg.org, Simon Pieters <simonp@opera.com>
On Thu, 27 Jun 2013, Philip J├Ągenstedt wrote:
>
> In a discussion about a "click to play/pause" feature for Opera on 
> Android, the issue of click event handlers came up.[1] The problem is 
> that pages can do things like this:
> 
> v.onclick = function() {
>  if (v.paused) {
>    v.play();
>  } else {
>    v.pause();
>  }
>  // no preventDefault()
> }
> 
> I created a demo [2] and it is indeed the case that this makes <video 
> controls> unusable in both Presto and Chromium based browsers. Simon 
> Pieters has brought this up before, but the spec wasn't changed at that 
> point.[3]
> 
> While my demo may be on the hypothetical side, we do want users to be 
> able to bring up the native controls via a context menu and be able to 
> use them regardless of what the page does in its event handlers. So, I 
> request that the spec be explicit that interacting with the video 
> controls does not cause the normal script-visible events to be fired.
> 
> [1] https://codereview.chromium.org/17391015
> [2] http://people.opera.com/~philipj/click.html
> [3] http://lists.whatwg.org/htdig.cgi/whatwg-whatwg.org/2011-June/031916.html
> (search for "As with the post Simon cites above")

I've made the spec say this is a valid (and recommended) implemenation 
strategy.

HTH,
-- 
Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'
Received on Tuesday, 6 August 2013 21:31:08 UTC

This archive was generated by hypermail 2.3.1 : Monday, 13 April 2015 23:09:23 UTC