mirror of
https://github.com/wekan/wekan.git
synced 2025-04-23 13:37:09 -04:00
Fixed trim whitespace at multiline editor fields
- before whitespaces were only trimmed if 2 or more whitespaces were at the end of the line - now every whitespace is trimmed at the end of each line
This commit is contained in:
parent
1eca7c9996
commit
a4ac34d8aa
1 changed files with 2 additions and 1 deletions
|
@ -49,7 +49,8 @@ InlinedForm = BlazeComponent.extendComponent({
|
|||
|
||||
getValue() {
|
||||
const input = this.find('textarea,input[type=text]');
|
||||
return this.isOpen.get() && input && input.value.replaceAll(/\s +$/gm, '');
|
||||
// \s without \n + unicode (https://developer.mozilla.org/de/docs/Web/JavaScript/Guide/Regular_Expressions#special-white-space)
|
||||
return this.isOpen.get() && input && input.value.replaceAll(/[ \f\r\t\v]+$/gm, '');
|
||||
},
|
||||
|
||||
events() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue