gsamaras gsamaras - 5 months ago 6
Javascript Question

Prevent enter from entering textarea


I want to allow the user to press enter and save the text
of the textarea, but I want the newline NOT to get applied in the text
of the textarea. Is that possible?


Here is my jsFiddle.

e.stopPropagation();


just seems to be not enough!

Answer

You'we missed return false;.

Try here.