Browse Source

textarea, remove every whitespace at line end

- whitespaces aren't needed at the end of the line, that's why
  String.trim() is already implemented at input fields
Martin Filser 3 years ago
parent
commit
4994f23134
1 changed files with 1 additions and 1 deletions
  1. 1 1
      client/lib/inlinedform.js

+ 1 - 1
client/lib/inlinedform.js

@@ -49,7 +49,7 @@ InlinedForm = BlazeComponent.extendComponent({
 
 
   getValue() {
   getValue() {
     const input = this.find('textarea,input[type=text]');
     const input = this.find('textarea,input[type=text]');
-    return this.isOpen.get() && input && input.value;
+    return this.isOpen.get() && input && input.value.replaceAll(/\s +$/gm, '');
   },
   },
 
 
   events() {
   events() {