Inconsistency in dragover event timing information #36689
Labels
Content:WebAPI
Web API docs
goal: consistency
(Experimental label) Issues about inconsistent/conflicting/contradictory content.
needs triage
Triage needed by staff and/or partners. Automatically applied when an issue is opened.
MDN URL
https://developer.mozilla.org/en-US/docs/Web/API/DragEvent
What specific section or headline is this issue about?
Event Types | dragover
What information was incorrect, unhelpful, or incomplete?
In the DragEvent page, the
ondragover
event timing is written as "50 ms [or sometimes 1-5 ms]":https://developer.mozilla.org/en-US/docs/Web/API/DragEvent
In the
dragover
event page, the timing is written as "every few hundred milliseconds":https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/dragover_event
In the HTML Drag and Drop API page, the timing is written as "every few hundred milliseconds":
https://developer.mozilla.org/en-US/docs/Web/API/HTML_Drag_and_Drop_API#drag_events
In the whatwg dragover event specification, the event loop is specified to run "every 350ms (±200ms)" with step 3. in the loop being the
dragover
event firing:https://html.spec.whatwg.org/multipage/dnd.html#event-dnd-dragover
This information seems to have been introduced in commit "initial en-us content checkin" in 2020:
https://github.com/mdn/content/blame/5bc689d5fe026fd0cd5e45f50222a07426d04a09/files/en-us/web/api/dragevent/index.md#L45
What did you expect to see?
Same timing information across MDN pages and whatwg spec, or if there is a difference between typical implementations and the whatwg spec, a note about that in the MDN pages.
Do you have any supporting links, references, or citations?
See "What information was incorrect, unhelpful, or incomplete?" section above for inline links to references.
Do you have anything more you want to share?
I did a quick test with the following code (Chrome, Safari, Firefox on macOS; Chrome, Firefox on Linux), and saw values in the range 0...50, with the exception of Firefox on Linux where the event does not fire if the mouse is stationary (this seems like a bug).
This seems to match closest with the statement "every 50 ms WHEN mouse is not moving ELSE much faster between 5 ms (slow movement) and 1ms (fast movement) approximately" found in https://developer.mozilla.org/en-US/docs/Web/API/DragEvent
Based on this test information, I think it would make most sense to update the information in the
dragover
event page to match the note in the DragEvent page, and to add an additional note that typical browser timing behavior is different from the spec. However, I would really like some extra eyes on whether I read the spec correctly, since I could be interpreting it wrong.Thank you!
MDN metadata
Page report details
en-us/web/api/dragevent
The text was updated successfully, but these errors were encountered: