Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Miscellaneous fixes #85

Merged
merged 1 commit into from

2 participants

@david-hollifield
  • Don't allow switchInput to navigate to hidden input fields
  • Let a tab navigate to the next input field if tabNavigation is enabled
@david-hollifield david-hollifield Miscellaneous bug fixes
- Don't allow switchInput to navigate to hidden input fields
- Let a tab navigate to the next input field if tabNavigation is enabled
12becef
@Mottie Mottie merged commit d731193 into from
@Mottie
Owner

Thanks, I appreciate the help! :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Jul 16, 2012
  1. @david-hollifield

    Miscellaneous bug fixes

    david-hollifield authored
    - Don't allow switchInput to navigate to hidden input fields
    - Let a tab navigate to the next input field if tabNavigation is enabled
This page is out of date. Refresh to see the latest.
Showing with 13 additions and 2 deletions.
  1. +13 −2 js/jquery.keyboard.js
View
15 js/jquery.keyboard.js
@@ -758,7 +758,7 @@ $.keyboard = function(el, options){
o.switchInput(base, goToNext, isAccepted);
} else {
var kb, stopped = false,
- all = $('.ui-keyboard-input'),
+ all = $('.ui-keyboard-input:visible'),
indx = all.index(base.$el) + (goToNext ? 1 : -1);
if (indx > all.length - 1) {
stopped = o.stopAtEnd;
@@ -1168,7 +1168,18 @@ $.keyboard = function(el, options){
base.insertText(' ');
},
tab : function(base) {
- if (base.el.tagName === 'INPUT') { return false; } // ignore tab key in input
+ var tag = base.el.tagName,
+ o = base.options;
+
+ if (tag === 'INPUT') {
+ if (o.tabNavigation) {
+ return base.switchInput(!base.shiftActive, true);
+ } else {
+ // ignore tab key in input
+ return false;
+ }
+ }
+
base.insertText('\t');
}
};
Something went wrong with that request. Please try again.