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

Make on:wheel event available in the <Input /> component #992

Closed
walker-tx opened this issue Apr 4, 2024 · 2 comments
Closed

Make on:wheel event available in the <Input /> component #992

walker-tx opened this issue Apr 4, 2024 · 2 comments
Labels
status: help wanted This issue is tentatively accepted pending a volunteer committed to its implementation type: feature Introduction of new functionality to the application

Comments

@walker-tx
Copy link
Contributor

Describe the feature

I'm making an editable table, and I found it annoying that the default behavior for HTML elements is to scroll when the mouse hovers over them, if the input value is longer than the width of the element itself. The accepted way to handle this is through the elements wheel event:

<script>
  function handleWheel(event) {
    if (document.activeElement !== event.target) {
      event.preventDefault();
    }
  }
</script>

<input type="text" on:wheel={handleWheel}>

The current implementation doesn't make this handler available. Is it cool if I make a PR for this? I have it working in my repo, just wanna share the love 🙃

@walker-tx walker-tx added the type: feature Introduction of new functionality to the application label Apr 4, 2024
@huntabyte
Copy link
Owner

Will gladly accept a PR to forward this event up 😃

@huntabyte huntabyte added the status: help wanted This issue is tentatively accepted pending a volunteer committed to its implementation label Apr 4, 2024
@huntabyte
Copy link
Owner

Closed by #994

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: help wanted This issue is tentatively accepted pending a volunteer committed to its implementation type: feature Introduction of new functionality to the application
Projects
None yet
Development

No branches or pull requests

2 participants