From f8c02c886efdf3e42819a960da28738e20bb7a48 Mon Sep 17 00:00:00 2001 From: Dave Methvin Date: Mon, 11 Jun 2012 18:44:54 -0400 Subject: 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. --- src/event.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/event.js b/src/event.js index 03049a5c4..bc08e4782 100644 --- a/src/event.js +++ b/src/event.js @@ -554,10 +554,8 @@ jQuery.event = { event.target = event.target.parentNode; } - // 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; }, -- cgit v1.2.3