Bug Tracker

Ticket #748 (closed enhancement: fixed)

Opened 8 years ago

Last modified 2 years ago

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:
Blocking: Blocked by:

Description

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

Change History

comment:1 Changed 8 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;
  };
})(jQuery);

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 8 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 8 years ago by john

  • Priority changed from major to minor
  • Type changed from bug to enhancement

comment:4 Changed 8 years ago by joern

  • Summary changed from Provide a way to hook into event object and fix to Normalize mouse and keyboard buttons (keyCode, modifiers)

comment:5 Changed 7 years ago by john

  • need set to Review
  • Status changed from new to closed
  • Version set to 1.1.2
  • Resolution set to fixed
  • Milestone set to 1.1.3

Fixed in SVN.

Note: See TracTickets for help on using tickets.