Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
MouseEvent: fix {page,offset}{X,Y} during dispatch
Ensure that pageX and pageY reflect the coordinate relative to the origin of the document, i.e. clientX/clientY in the absence of scrolling support, during dispatch. Also fix the target-relative coordinates, offsetX and offsetY, during dispatch. These will typically be (0, 0), e.g. in a synthetic click or a dispatched MouseEvent with default coordinates, but it will mirror clientX/clientY if those are set. Lastly, remove some scrollX/scrollY logic for values computed outside of dispatch. While it logically followed the spec, scrolling is not implemented and it is unsafe to base the calculation on those replaceable properties.
- Loading branch information
Showing
2 changed files
with
23 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters