Skip to content

Commit

Permalink
Resolve issue #549 - raising keypress by functional keys is Firefox
Browse files Browse the repository at this point in the history
  • Loading branch information
Vick-edit committed Apr 17, 2017
1 parent d6ff147 commit 403e247
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions js/jquery.keyboard.js
Original file line number Diff line number Diff line change
Expand Up @@ -753,6 +753,11 @@ http://www.opensource.org/licenses/mit-license.php
k1 = k >= keyCodes.A && k <= keyCodes.Z,
k2 = k >= keyCodes.a && k <= keyCodes.z,
str = base.last.key = String.fromCharCode(k);
// check, that keypress wasn't rise by functional key
// space is first typing symbol in UTF8 table
if (k < keyCodes.space && e.keyCode !== 0){ //see #549
return;
}
base.last.virtual = false;
base.last.event = e;
base.last.$key = []; // not a virtual keyboard key
Expand Down

0 comments on commit 403e247

Please sign in to comment.