[whatwg] Should <video controls> generate click events?
silviapfeiffer1 at gmail.com
Tue Aug 20 15:28:18 PDT 2013
On Wed, Aug 21, 2013 at 7:52 AM, Edward O'Connor <eoconnor at apple.com> wrote:
> >>> [W]e 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.
> >> I've made the spec say this is a valid (and recommended)
> >> implemenation strategy.
> > The change <http://html5.org/r/8134> looks good to me, thanks!
> I don't see why <video controls> should be any different than, say,
> <button> here. If I install an event handler on an ancestor of an
> element, I'm able to capture events and prevent the descendent element
> from seeing them.
> A UI which allows users to activate a control "regardless of what the
> page does in its event handlers" is a general feature not specific to
> media elements—and may be worth considering—but we shouldn't make a
> one-off exception to the basic model of DOM events just for <video>.
The paragraph added in <http://html5.org/r/8134> should probably be
restricted to the case where the default video controls have been enabled
by the user (e.g. through the context menu) rather than by the Web page. It
would indeed be bad if the Web page author, who is using the default
controls through a <video controls> attribute could not rely on the events
IMHO, the example that Philip provided in http://people.opera.com/~**
philipj/click.html <http://people.opera.com/~philipj/click.html> is not a
realistic example of something a JS dev would do.
More information about the whatwg