So my problem is that, i have a text area with 3 rows. Its a part of a chat application which receives text from a user.
I want to send the text and clear the text area as soon as the user presses the enter key. Now the problem is that whenever user presses the enter key the cursor goes to next line(row) and then on clearing the text area it comes to first, so it looks weird to a user that the cursor goes to next line and then comes to first.
So I want to stop the cursor from going into the next line on press of enter key, i had used key events but found of no use, anyone have suggestions for this??