Skip to main content

Bug Tracker

Side navigation

#10676 closed bug (fixed)

Opened November 04, 2011 10:26PM UTC

Closed November 07, 2011 04:15PM UTC

Last modified March 08, 2012 08:01PM UTC

wheelDelta not added to mousewheel event anymore

Reported by: anonymous Owned by: dmethvin
Priority: low Milestone: 1.7.1
Component: event Version: git
Keywords: Cc:
Blocked by: Blocking:
Description

It appears that inside a mousewheel event handler, wheelDelta is not added as a property to the jQuery event object anymore, because mousewheel is not in the list of events that have mouseHooks added. Only some of the following events do, namely the ones that pass rmouseEvent of the following:

"blur focus focusin focusout load resize scroll unload click dblclick " +
"mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave " +
"change select submit keydown keypress keyup error contextmenu"

This renders the wheelDelta property in mouseHooks useless, since no other event passes this property. Only mousewheel provides this data, but it is not used by jQuery because it's not in the above list.

It would perhaps be a better idea to either drop wheelDelta from mouseHooks or support mousewheel as an event like the other mouse events above.

http://jsfiddle.net/3cB95/

(Of course, e.originalEvent.wheelDelta works; my point is that wheelDelta is never used although it is in mouseHooks.)

Attachments (0)
Change History (2)

Changed November 05, 2011 01:01AM UTC by dmethvin comment:1

component: unfiledevent
milestone: None1.7.1
owner: → dmethvin
priority: undecidedlow
status: newassigned

I agree that it is not useful as is. Since it's not cross-browser it probably doesn't make sense to keep it on the list. Even if we added the mousewheel event it to mousehooks it wouldn't be cross-browser. Brandon Aaron's jquery-mousewheel.js plugin has been updated to work in 1.7 so I think we can remove this event from the list to copy.

Changed November 07, 2011 04:15PM UTC by Dave Methvin comment:2

resolution: → fixed
status: assignedclosed

Fix #10676. Remove wheelDelta from the event props list.

A cross-browser solution is best handled in a plugin such as jquery-mousewheel.js .

Changeset: 13aa84580a837b811dbe2f5d1bc34cf9ca9a6d8d