How do I achieve the following behavior in an html text input: when a user clicks the input, all the text will be selected, even if it's already selected. Thus there won't be any possibility to delete/select certain characters.
currently I have the following:
elm.on('click', function(e) {
e.preventDefault();
$(this).select();
});
but if the text is selected then a click displays a carret.