trying to figure out why this is happening – I have an input text field and I want all the text to be highlighted when the field receives focus. This happens, very quickly, and then all of the text is unselected. Any idea why this would occur? Here’s the code I’m using:
$("#permalink").focus(function(){
this.select();
});
You need to override the mouseup event on the input element (as mentioned in this post – thanks MrSlayer!)
See here for example: http://jsfiddle.net/f8TdX/