Skip to content
Browse files

fixed locked input issue #77

  • Loading branch information...
1 parent e00adc3 commit a1cc05eb6ee33f606764c0fd2aaaf387bc653543 @Mottie committed Jun 15, 2012
Showing with 3 additions and 3 deletions.
  1. +3 −3 js/jquery.keyboard.js
View
6 js/jquery.keyboard.js
@@ -155,7 +155,7 @@ $.keyboard = function(el, options){
.attr({ 'aria-haspopup' : 'true', 'role' : 'textbox' });
// add disabled/readonly class - dynamically updated on reveal
- if (base.$el.is(':disabled') || base.$el.attr('readonly')) {
+ if (base.$el.is(':disabled') || base.$el.attr('readonly') && !base.$el.hasClass('lockedinput')) {
base.$el.addClass('ui-keyboard-nokeyboard');
}
if (o.openOn) {
@@ -198,7 +198,7 @@ $.keyboard = function(el, options){
$('.ui-keyboard:not(.ui-keyboard-always-open)').hide();
// Don't open if disabled
- if (base.$el.is(':disabled') || base.$el.attr('readonly')) {
+ if (base.$el.is(':disabled') || base.$el.attr('readonly') && !base.$el.hasClass('lockedinput')) {
base.$el.addClass('ui-keyboard-nokeyboard');
return;
} else {
@@ -839,7 +839,7 @@ $.keyboard = function(el, options){
base.$preview = base.$el;
o.position.at = o.position.at2;
}
- base.$preview.attr( (o.lockInput) ? { 'readonly': 'readonly'} : {} );
+ base.$preview.addClass('lockedinput').attr( (o.lockInput) ? { 'readonly': 'readonly'} : {} );
// verify layout or setup custom keyboard
if (o.layout === 'custom' || !$.keyboard.layouts.hasOwnProperty(o.layout)) {

0 comments on commit a1cc05e

Please sign in to comment.
Something went wrong with that request. Please try again.