diff --git a/numeric/jquery.numeric.js b/numeric/jquery.numeric.js index 417f26c..3efbe9b 100644 --- a/numeric/jquery.numeric.js +++ b/numeric/jquery.numeric.js @@ -217,7 +217,13 @@ $.fn.numeric.keyup = function(e) } // set the value and prevent the cursor moving to the end this.value = val; - $.fn.setSelection(this, carat); + if (e.keyCode==9) // if keyCode == tab, select all value. It's better. + { + this.select(); + } + else { + $.fn.setSelection(this, carat); + } } };