The minus key on android does not fire on key press event. So I used this code on key down event:
if ($.browser.device && key == 229) { // minus key on android
var val = e.target.value;
if ((val.match(/-/g) || []).length >= 1) {
val = val.replaceAll("-", ""); //remove signal
} else {
if (settings.allowNegative) {
val = '-' + val; //add signal
}
}
setTimeout(function() { // need this because we can't use preventDefault on android
$input.val(val);
}, 100);
return false;
}
The minus key on android does not fire on key press event. So I used this code on key down event: