From baf572ae1ccbac3e5542a54c5680ee74003f4ddf Mon Sep 17 00:00:00 2001 From: "vta vta@openerp.com" <> Date: Thu, 30 Aug 2012 09:20:24 +0200 Subject: [PATCH] [FIX] Fixed resize after sending. bzr revid: vta@openerp.com-20120830072024-004ingk1ourozupn --- addons/web/static/src/js/view_form.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/addons/web/static/src/js/view_form.js b/addons/web/static/src/js/view_form.js index 6abc3c470d6..0b0366a9ee4 100644 --- a/addons/web/static/src/js/view_form.js +++ b/addons/web/static/src/js/view_form.js @@ -2324,6 +2324,7 @@ instance.web.form.FieldText = instance.web.form.AbstractField.extend(instance.we template: 'FieldText', initialize_content: function() { this.$textarea = this.$el.find('textarea'); + this.default_height = this.$textarea.css('height'); if (!this.get("effective_readonly")) { this.$textarea.change(_.bind(function() { this.set({'value': instance.web.parse_value(this.$textarea.val(), this)}); @@ -2345,9 +2346,8 @@ instance.web.form.FieldText = instance.web.form.AbstractField.extend(instance.we render_value: function() { var show_value = instance.web.format_value(this.get('value'), this, ''); this.$textarea.val(show_value); - if (show_value) { - this.$textarea.autosize(); - } + this.$textarea.autosize(); + this.$textarea.css('height', parseInt(this.default_height)+"px"); }, is_syntax_valid: function() { if (!this.get("effective_readonly")) {