I have made a <textarea> for inputs. When a user presses 'enter', it automatically takes their input and runs a js function. However apart from running this function, it also takes the cursor to the next line. How do I made it so that the textarea has only one line or pressing enter simply doesn't do anything.
I tried adding the attribute data-role = 'none'.
I've even tried adding the CSS file
.textarea{
   resize: none;
}
Nothing seems to be working. What should I try?
 
     
     
     
    