mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-05-05 06:32:30 +02:00
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.
1.4 KiB
1.4 KiB