summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMaxime Quandalle <maxime@quandalle.com>2015-12-09 22:55:30 -0500
committerMaxime Quandalle <maxime@quandalle.com>2015-12-09 23:20:53 -0500
commit0954ef3e441da585ca0f801301ab7ea6e83e7cbf (patch)
tree56fe27705ba3c0ba96df78a059c6eda21c4836d3
parent480ef632730b28c9a7ec4d6dfd6e682c8df7c099 (diff)
downloadwekan-0954ef3e441da585ca0f801301ab7ea6e83e7cbf.tar.gz
wekan-0954ef3e441da585ca0f801301ab7ea6e83e7cbf.tar.bz2
wekan-0954ef3e441da585ca0f801301ab7ea6e83e7cbf.zip
Dynamically resize the new card form if the title is too long
-rw-r--r--client/components/cards/minicard.styl3
-rw-r--r--client/components/lists/listBody.js7
2 files changed, 8 insertions, 2 deletions
diff --git a/client/components/cards/minicard.styl b/client/components/cards/minicard.styl
index 1c27efff..47d160f4 100644
--- a/client/components/cards/minicard.styl
+++ b/client/components/cards/minicard.styl
@@ -133,5 +133,6 @@
margin: 0
padding: 0
max-height: 162px
- min-height: 54px
+ min-height: 36px
+ margin-bottom: 20px
overflow-y: auto
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*)$/,