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

Mouse events do not work if element is transformed and scrolled off the top of the screen. #2373

Open
1 task
Psychpsyo opened this issue Nov 16, 2024 · 0 comments
Labels
bug Something isn't working has repro We have a way to reproduce this bug. layout

Comments

@Psychpsyo
Copy link
Contributor

Summary

If an element has a transform that makes it so that it is visible on-screen, despite its original position being scrolled completely off the page, it does not receive mouse events.

Manually abspos'ing it into a position like that has it still receive events.

Operating system

Linux

Steps to reproduce

  1. Open this document:
<!DOCTYPE html>
<style>
  body {
    height: 150vh;
  }
  div {
    background-color: gray;
    height: 10px;
    transform: scaleY(100);
  }
  div:hover {
    background-color: green;
  }
</style>
<div onClick="console.log('it worked!')"></div>
  1. Scroll down a bit
  2. Try to hover or click the div.

Expected behavior

The div should still receive mouse events.

Actual behavior

The div does not receive mouse events.

URL for a reduced test case

See above.

HTML/SVG/etc. source for a reduced test case

<!DOCTYPE html>
<style>
  body {
    height: 150vh;
  }
  div {
    background-color: gray;
    height: 10px;
    transform: scaleY(100);
  }
  div:hover {
    background-color: green;
  }
</style>
<div onClick="console.log('it worked!')"></div>

Log output and (if possible) backtrace

None, I think.

Screenshots or screen recordings

No response

Build flags or config settings

No response

Contribute a patch?

  • I’ll contribute a patch for this myself.
@AtkinsSJ AtkinsSJ added bug Something isn't working has repro We have a way to reproduce this bug. layout labels Jan 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working has repro We have a way to reproduce this bug. layout
Projects
None yet
Development

No branches or pull requests

2 participants