Bug 181596
| Summary: | Drag is prevented on video elements without controls attribute | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Scott Steele <scott> |
| Component: | Media | Assignee: | Nobody <webkit-unassigned> |
| Status: | NEW | ||
| Severity: | Normal | CC: | graouts, scott, webkit-bug-importer |
| Priority: | P2 | Keywords: | InRadar |
| Version: | WebKit Nightly Build | ||
| Hardware: | Mac | ||
| OS: | macOS 10.13 | ||
| See Also: | https://bugs.webkit.org/show_bug.cgi?id=172932 | ||
Scott Steele
Overview:
Video elements without the controls attribute should support drag.
Steps to reproduce:
1. Create a webpage with a video element without the controls attribute as a child of a draggable div.
2. Cause the video to be reloaded and played.
3. Select and attempt to drag the video.
Actual results:
Video element does not drag. dragend is fired immediately.
Expected results:
Video element is draggable. dragend is fired only after the mouse button is released.
Other useful information:
In /Source/WebCore/Modules/modern-media-controls/controls/media-controls.js, dragstart is cancelled in handleEvent() as follows:
+ handleEvent(event)
{
+ if (event.type === "focusin" && event.currentTarget === this.element)
+ this.faded = false;
+ else if (event.type === "dragstart" && this.isPointInControls(new DOMPoint(event.clientX, event.clientY)))
+ event.preventDefault();
}
Instead, drag should only be prevented when the controls attribute is present on the media element.
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Radar WebKit Bug Importer
<rdar://problem/36540541>