You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is my code and I'm applying it to a Asp.Net 4 Textbox but when I hit Accept it doesn't close the keyboard. I've tried calling the accepted with the keyboard.accepted() callback but it starts an endless loop. I was able to close it with keyboard.destroy() but that defeats the purpose. I've also tried with autoAccept on and off.
$('.numpad').keyboard({
keyBinding: 'mousedown touchstart',
layout: 'custom',
autoAccept: true,
restrictInput: true,
acceptValid: false,
validate: function (keyboard, value, isClosing) {
// test value to only allow numbers RegEx between / RegEx /.test
var test = /^\d*(.\d{1,2})?$/.test(value);
// if the value is invalid, clear the input
if (!test) { keyboard.$preview.val(''); }
// return valid test (true or false)
return test;
},
customLayout: {
'default': ['7 8 9', '4 5 6', '1 2 3', '0 00', '{a} {b} .']
},
usePreview: false // no preveiw
});
The text was updated successfully, but these errors were encountered:
This should now be fixed in the latest version... oops autoclosed because of the commit description. Please feel free to reopen this issue if you continue to have problems.
This is my code and I'm applying it to a Asp.Net 4 Textbox but when I hit Accept it doesn't close the keyboard. I've tried calling the accepted with the keyboard.accepted() callback but it starts an endless loop. I was able to close it with keyboard.destroy() but that defeats the purpose. I've also tried with autoAccept on and off.
$('.numpad').keyboard({
keyBinding: 'mousedown touchstart',
layout: 'custom',
autoAccept: true,
restrictInput: true,
acceptValid: false,
validate: function (keyboard, value, isClosing) {
// test value to only allow numbers RegEx between / RegEx /.test
var test = /^\d*(.\d{1,2})?$/.test(value);
// if the value is invalid, clear the input
if (!test) { keyboard.$preview.val(''); }
// return valid test (true or false)
return test;
},
customLayout: {
'default': ['7 8 9', '4 5 6', '1 2 3', '0 00', '{a} {b} .']
},
usePreview: false // no preveiw
});
The text was updated successfully, but these errors were encountered: