I came across this bug while trying to add support for meta key in my
jquery.hotkeys plugin (http://code.google.com/p/js-hotkeys)

Here is what I found at jquery.js | version 1.2.6 | line 2150

// Add metaKey to non-Mac browsers (use ctrl for PC's and Meta for
Macs)
if ( !event.metaKey && event.ctrlKey )
    event.metaKey = event.ctrlKey;

This is causing a buggy behavior in the following scenario:
A user wish to bind ctrl+x to function-A and command+x to function-B
When ctrl+x were pressed, event.metaKey is true as well as
event.ctrlKey so function-B is called even though only function-A
should be triggered.

The the would obviously be to add additional check for Mac or non Mac
operating system, something like:

if ( !event.metaKey && event.ctrlKey && !(/Mac
OS/.test(navigator.userAgent))
    event.metaKey = event.ctrlKey;


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"jQuery Development" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/jquery-dev?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to