Skip to content
Browse files
Fix #11328. I've never metaKey I liked on IE 6/7/8.
The `event.metaKey` property is undefined there so we ensure it's set to `false` for lack of a better default. The `originalEvent.metaKey` property is untouched if you prefer to make other guesses about the platform or key state.

This is pretty much impossible to unit test since it is not only platform dependendent but also only executed for native browser events.
  • Loading branch information
dmethvin committed Jun 11, 2012
1 parent 9e0c056 commit f8c02c8
Showing 1 changed file with 2 additions and 4 deletions.
@@ -554,10 +554,8 @@ jQuery.event = { =;

// For mouse/key events; add metaKey if it's not there (#3368, IE6/7/8)
if ( event.metaKey === undefined ) {
event.metaKey = event.ctrlKey;
// For mouse/key events, metaKey==false if it's undefined (#3368, #11328; IE6/7/8)
event.metaKey = !!event.metaKey;

return fixHook.filter? fixHook.filter( event, originalEvent ) : event;

0 comments on commit f8c02c8

Please sign in to comment.