Skip to content

Commit

Permalink
Merge pull request #27 from Mathachew/dev
Browse files Browse the repository at this point in the history
Addresses forms submittion using on-screen keyboard
  • Loading branch information
Mathachew committed Jan 14, 2014
2 parents 872598b + 556f6d0 commit 72a6eaa
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 9 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
## 1.5.3

Bug fixes:

* addresses an issue with forms not submitting from the on-screen keyboard (#22)


## 1.5.2

Bug fixes:
Expand Down
2 changes: 1 addition & 1 deletion autotab.jquery.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"filter",
"autotab"
],
"version": "1.5.2",
"version": "1.5.3",
"author": {
"name": "Mathachew",
"url": "https://github.com/Mathachew"
Expand Down
2 changes: 1 addition & 1 deletion component.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "jquery.autotab",
"version": "1.5.2",
"version": "1.5.3",
"description": "jQuery plugin that provides auto-tabbing and filtering on text fields in a form.",
"main": [ "./js/jquery.autotab.min.js" ],
"homepage": "https://github.com/Mathachew/jquery-autotab",
Expand Down
10 changes: 5 additions & 5 deletions js/jquery.autotab.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Autotab - jQuery plugin 1.5.2
* Autotab - jQuery plugin 1.5.3
* https://github.com/Mathachew/jquery-autotab
*
* Copyright (c) 2013 Matthew Miller
Expand Down Expand Up @@ -349,15 +349,15 @@
}
}
}).on('keypress', function (e) {
var defaults = getSettings(this);
var defaults = getSettings(this),
keyCode = e.which || e.keyCode;

// e.charCode == 0 indicates a special key has been pressed, which only Firefox triggers
if (!defaults || defaults.disabled || (settings.firefox && e.charCode === 0) || e.ctrlKey || e.altKey) {
if (!defaults || defaults.disabled || (settings.firefox && e.charCode === 0) || e.ctrlKey || e.altKey || keyCode == 13) {
return true;
}

var keyCode = e.which || e.keyCode,
keyChar = String.fromCharCode(keyCode);
var keyChar = String.fromCharCode(keyCode);

// Prevents auto tabbing when defaults.trigger is pressed
if (defaults.trigger !== null && defaults.trigger.indexOf(keyChar) >= 0) {
Expand Down
4 changes: 2 additions & 2 deletions js/jquery.autotab.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 72a6eaa

Please sign in to comment.