[Webkit-unassigned] [Bug 134446] New: Media elements should not trigger events for control interactions

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Jun 30 09:28:21 PDT 2014


https://bugs.webkit.org/show_bug.cgi?id=134446

           Summary: Media elements should not trigger events for control
                    interactions
           Product: WebKit
           Version: 528+ (Nightly build)
          Platform: Macintosh
               URL: http://www.quirksmode.org/html5/tests/video.html
        OS/Version: Mac OS X 10.9
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: Media Elements
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: chris at improbable.org


According to the HTML specification, native controls on the media element should not trigger normal mouse
events:

“If the user agent exposes a user interface to the user by displaying controls over the media element, then
the user agent should suppress any user interaction events while the user agent is interacting with this
interface. (For example, if the user clicks on a video's playback control, mousedown events and so forth
would not simultaneously be fired at elements on the page.)”

http://www.whatwg.org/specs/web-apps/current-work/multipage/the-video-element.html#attr-media-controls

The WebKit nightlies do not follow this behaviour:

1. Open http://www.quirksmode.org/html5/tests/video.html

2. Run the following JavaScript in the console:

Array.prototype.forEach.call(document.querySelectorAll('video'), function (i) {
    i.addEventListener('mousedown', function (evt) { console.log('video', evt.type) });
    i.addEventListener('mouseup', function (evt) { console.log('video', evt.type) });
    i.addEventListener('click', function (evt) { console.log('video', evt.type) });
    i.parentNode.addEventListener('mousedown', function (evt) { console.log('parent', evt.type) });
    i.parentNode.addEventListener('mouseup', function (evt) { console.log('parent', evt.type) });
    i.parentNode.addEventListener('click', function (evt) { console.log('parent', evt.type) });
})

3. Click on the play/pause button on a <video> element with native controls

Note that the mousedown/mouseup/click events all fire and there is no way to tell whether the event was 
triggered by a click on the video itself or on a control.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.


More information about the webkit-unassigned mailing list