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

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

From: Philip Jägenstedt <philipj@opera.com>
Date: Thu, 27 Jun 2013 10:51:15 +0200
To: whatwg@whatwg.org
Message-ID: <op.wzbxjpiqsr6mfa@kirk>
Cc: Simon Pieters <simonp@opera.com>
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) {
   } else {
   // 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  

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
(search for "As with the post Simon cites above")

Philip Jägenstedt
Opera Software
Received on Thursday, 27 June 2013 08:51:46 UTC

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