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.
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;
},