Bug Tracker

Modify

Ticket #748 (closed enhancement: fixed)

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

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

comment:4 Changed 7 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.

Please follow the  bug reporting guidlines and use  jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

View

Add a comment

Modify Ticket

Action
as closed
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.