Select text on focus

Viewed 18747

I'm trying to select the text in a readonly input box, using jQuery, this is what I have:

    $('input').focus(function(){
        $(this).select();
    })

When I click on the input however, it quickly selects all the text, it "blinks", then it goes back to normal state of being unselected.

Any ideas around this?

8 Answers
Related