Tweak the logic for fixing event.which. Fixes #2338.
This commit is contained in:
parent
9190d4fd60
commit
e3c4e57897
1 changed files with 2 additions and 2 deletions
|
@ -470,8 +470,8 @@ jQuery.event = {
|
|||
}
|
||||
|
||||
// Add which for key events
|
||||
if ( !event.which && ((event.charCode || event.charCode === 0) ? event.charCode : event.keyCode) ) {
|
||||
event.which = event.charCode || event.keyCode;
|
||||
if ( event.which == null && (event.charCode != null || event.charCode != null) ) {
|
||||
event.which = event.charCode != null ? event.charCode : event.keyCode;
|
||||
}
|
||||
|
||||
// Add metaKey to non-Mac browsers (use ctrl for PC's and Meta for Macs)
|
||||
|
|
Loading…
Reference in a new issue