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

Add a new wheel event, deprecate the mousewheel one #249

Open
mgol opened this issue Mar 14, 2025 · 1 comment
Open

Add a new wheel event, deprecate the mousewheel one #249

mgol opened this issue Mar 14, 2025 · 1 comment
Assignees
Milestone

Comments

@mgol
Copy link
Member

mgol commented Mar 14, 2025

Let's discuss plans for jQuery Mousewheel 4.0.0.

At the very least, I'd like to align browser support with jQuery 4.x. Also, all browsers now support the wheel event, so we can drop other underlying events.

There exists a 4.0.x branch from 2014. Some improvements could be backported, but the branch also added some code for throttling/debouncing, which I'd consider out of scope at this point.

However, this plugin follows the legacy mousewheel event delta sign which is the opposite sign to the native wheel event and it'd be good to align. The 4.0.x branch did that, but just reversing the sign on an existing event would be too disruptive. I see two options:

  1. Make this plugin also expose the wheel event, mark the mousewheel one as deprecated but keep it.
  2. Deprecate this plugin, pointing people to my jquery-wheel. I'd be happy to donate it to OpenJSF and backport any code from jQuery Mousewheel that makes sense for that event.
  3. Despite the issues this plugin solves, deprecate it anyway.

I'm making jQuery UI not depend on this plugin in jquery/jquery-ui#2338, so at least that shouldn't block us.

The main reason why we I'm thinking about not deprecating the plugin without a replacement is that the native wheel event may report deltas in pixels, lines or pages. Chrome may report pixels or pages, Firefox can report all three depending on input devices. This plugin can be useful to get some pixel-based normalization; as long as browsers don't provide that out of the box, I see some value in this plugin. There are some discussions about always exposing pixels, perhaps in addition to other modes, in w3c/uievents#181, but so far the discussion has stalled.

@mgol mgol added the Discuss in Meeting Reserved for Issues and PRs that anyone would like to discuss in the weekly meeting. label Mar 14, 2025
@timmywil timmywil removed the Discuss in Meeting Reserved for Issues and PRs that anyone would like to discuss in the weekly meeting. label Mar 17, 2025
@mgol
Copy link
Member Author

mgol commented Mar 17, 2025

We settled on option 1.

@mgol mgol self-assigned this Mar 17, 2025
@mgol mgol added this to the 4.0.0 milestone Mar 17, 2025
@mgol mgol changed the title Plans for 4.0.0 Add a new wheel event, deprecate the mousewheel one Mar 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants