Skip to content

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

Open
@mgol

Description

@mgol

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.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions