Bug Tracker

Opened 11 years ago

Closed 10 years ago

Last modified 5 years ago

#748 closed enhancement (fixed)

Normalize mouse and keyboard buttons (keyCode, modifiers)

Reported by: yehuda Owned by:
Priority: minor Milestone: 1.1.3
Component: event Version: 1.1.2
Keywords: Cc:
Blocked by: Blocking:


For example, it would be cool if dimensions.js could provide a cross-browser offsetX, and other plugins could provide other fixes.

Change History (5)

comment:1 Changed 11 years ago by joern

You could just intercept it:

(function($) {
  var org = $.event.fix;
  $.event.fix = function(event) {
    event = org(event);
    // add other stuff to event
    return event;

This should even work with multiple plugins, as long as the reference to the original is stored in a closure, instead of renaming it to something like "_fix".

comment:2 Changed 11 years ago by joern

A fix-my-events-for-real-this-time plugin would be great. Resources:

http://www.quirksmode.org/js/events_properties.html http://www.quirksmode.org/dom/w3c_events.html

comment:3 Changed 11 years ago by john

Priority: majorminor
Type: bugenhancement

comment:4 Changed 11 years ago by joern

Summary: Provide a way to hook into event object and fixNormalize mouse and keyboard buttons (keyCode, modifiers)

comment:5 Changed 10 years ago by john

Milestone: 1.1.3
need: Review
Resolution: fixed
Status: newclosed
Version: 1.1.2

Fixed in SVN.

Note: See TracTickets for help on using tickets.