Modify ↓
Ticket #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: | ||
| 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:2 Changed 6 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 6 years ago by john
- Priority changed from major to minor
- Type changed from bug to enhancement
Please follow the bug reporting guidlines and use jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.
Note: See
TracTickets for help on using
tickets.

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".