Reputation: 664
MyEvent.prototype.sendMessage_ = function(input) {
//input is this.find('#mytextarea');
if (input.val().trim() != '') {
input.val('');
$('#mytextarea').focus();
}
};
//...in the html....//
<textarea type="text" placeholder="Input Here" id="mytextarea"></textarea>
After empty a textarea with Jquery, the cursor is still at the end of the input, how could one move the cursor to the beginning of the textarea?
And in the view I have:
Upvotes: 0
Views: 56