From 1bc595306a707c7358b5f04e90ccab84b8280935 Mon Sep 17 00:00:00 2001 From: Giulio Cesare Solaroli Date: Mon, 20 Jul 2015 18:11:23 +0200 Subject: [PATCH] Fixed rendering issue in card detail when in compact view --- .../delta/js/Clipperz/PM/UI/Components/Cards/TextArea.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/frontend/delta/js/Clipperz/PM/UI/Components/Cards/TextArea.js b/frontend/delta/js/Clipperz/PM/UI/Components/Cards/TextArea.js index ff26254..4bf427a 100644 --- a/frontend/delta/js/Clipperz/PM/UI/Components/Cards/TextArea.js +++ b/frontend/delta/js/Clipperz/PM/UI/Components/Cards/TextArea.js @@ -33,6 +33,10 @@ Clipperz.PM.UI.Components.Cards.TextAreaClass = React.createClass({ this.getDOMNode().addEventListener('input', this.recalculateSize, false); }, + componentDidUpdate: function () { + this.recalculateSize(); + }, + componentWillUnmount: function() { this.getDOMNode().removeEventListener('input', this.recalculateSize, false); }, @@ -65,7 +69,7 @@ Clipperz.PM.UI.Components.Cards.TextAreaClass = React.createClass({ var node = this.getDOMNode(); node.style.height = 'auto'; - node.style.height = node.scrollHeight+'px'; + node.style.height = node.scrollHeight + 'px'; window.scrollTo(window.scrollLeft, (node.scrollTop + node.scrollHeight)); }, /*