From 0954ef3e441da585ca0f801301ab7ea6e83e7cbf Mon Sep 17 00:00:00 2001 From: Maxime Quandalle Date: Wed, 9 Dec 2015 22:55:30 -0500 Subject: Dynamically resize the new card form if the title is too long --- client/components/lists/listBody.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'client/components/lists/listBody.js') diff --git a/client/components/lists/listBody.js b/client/components/lists/listBody.js index 1fc84c82..c3a85614 100644 --- a/client/components/lists/listBody.js +++ b/client/components/lists/listBody.js @@ -57,6 +57,7 @@ BlazeComponent.extendComponent({ // We keep the form opened, empty it, and scroll to it. textarea.val('').focus(); + autosize.update(textarea); if (position === 'bottom') { this.scrollToBottom(); } @@ -180,7 +181,11 @@ BlazeComponent.extendComponent({ onRendered() { const editor = this; - this.$('textarea').escapeableTextComplete([ + const $textarea = this.$('textarea'); + + autosize($textarea); + + $textarea.escapeableTextComplete([ // User mentions { match: /\B@(\w*)$/, -- cgit v1.2.3-1-g7c22