title: textarea Allow line to be passed as content (jquery)
body: <p>why When I press enter, it sends the blank even though I prevented it from doing so in the condition</p>
  <pre class="lang-js prettyprint-override"><code>$(&quot;.chat-end textarea&quot;).keypress(function (e) {
      let text = $(this).val();
  
      if (e.which === 13) {
          if (text !== &quot;&quot;) {
              // here my problem Allow line to passed
  
              $(&quot;.chat-body&quot;).append(&quot;&lt;p&gt;&quot; + text + &quot;&lt;/p&gt;&quot;);
              $(&quot;.chat textarea&quot;).val(&quot;&quot;);
          }
      }
  });
  </code></pre>