Possible Duplicate:
Focus input field with JQuery without selecting current value text
Using the following code to focus the first field in the form:
$(document).ready(function(){
$("form input:visible:enabled:first").focus();
});
Why does it select the text in the field? How to focus the input without selecting the text?
Working in Ruby on Rails. Tested on Chrome.