Search code examples
javascriptjquerykeyenterstoppropagation

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!


Solution

  • You'we missed return false;.

    Try here.