Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LibWeb: Make MouseEvent.offsetX/Y ignore transforms #2372

Merged
merged 1 commit into from
Dec 13, 2024

Conversation

Psychpsyo
Copy link
Contributor

That is what the spec calls it, at least.
In code, this manifests as making the offset very aware of the element's transform cause the click position comes relative to the viewport, not the transformed element.

IMPORTANT:
For this to give the correct numbers, #2364 needs to be merged first to fix all the other issues that MouseEvent positions have.

@Psychpsyo Psychpsyo force-pushed the fix-offsetXY branch 2 times, most recently from 0a9e212 to 1eb7811 Compare November 19, 2024 22:27
@Psychpsyo Psychpsyo force-pushed the fix-offsetXY branch 3 times, most recently from ca469bc to 2b1c20d Compare November 20, 2024 20:05
That is what the spec calls it, at least.
In code, this manifests as making the offset very aware
of the element's transform, because the click position comes
relative to the viewport, not to the transformed element.
Copy link

This pull request has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs. Thank you for your contributions!

@github-actions github-actions bot added the stale label Dec 13, 2024
@gmta gmta enabled auto-merge (rebase) December 13, 2024 06:08
@gmta gmta merged commit 4dc65c5 into LadybirdBrowser:master Dec 13, 2024
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants