mirror of
https://github.com/wekan/wekan.git
synced 2025-04-22 21:17:18 -04:00
Checklist-Items, Autoresize the textarea vertically to fit the user-input
This commit is contained in:
parent
688a31877b
commit
6410012384
1 changed files with 8 additions and 0 deletions
|
@ -186,6 +186,12 @@ BlazeComponent.extendComponent({
|
|||
}
|
||||
},
|
||||
|
||||
// resize the textarea vertically to fit the user-input
|
||||
autoResize(event) {
|
||||
const textarea = event.target;
|
||||
textarea.style.height = textarea.scrollHeight + 'px';
|
||||
},
|
||||
|
||||
events() {
|
||||
const events = {
|
||||
'click .toggle-delete-checklist-dialog'(event) {
|
||||
|
@ -209,6 +215,8 @@ BlazeComponent.extendComponent({
|
|||
'click .js-delete-checklist-item': this.deleteItem,
|
||||
'click .confirm-checklist-delete': this.deleteChecklist,
|
||||
'focus .js-add-checklist-item': this.focusChecklistItem,
|
||||
'input textarea.js-edit-checklist-item': this.autoResize,
|
||||
'focus textarea.js-edit-checklist-item': this.autoResize,
|
||||
keydown: this.pressKey,
|
||||
},
|
||||
];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue