Files
ladybird/Libraries/LibWeb/HTML/DragEvent.cpp
Andreas Kling 2a547ec687 LibWeb: Initialize pageX/pageY and offsetX/offsetY in event constructors
When constructing MouseEvent, PointerEvent, DragEvent, or WheelEvent
from JavaScript, pageX/pageY and offsetX/offsetY were left at 0
instead of being initialized from clientX/clientY.

Per the CSSOM View spec, pageX should be clientX + scrollX (which is 0
for a newly constructed event with no associated window), and offsetX
should be clientX minus the target's bounding rect origin (which is 0
for an event with no target). So both should default to clientX.
2026-03-08 18:09:10 +01:00

1.4 KiB