From 29abcce70fb7bf5771bbdeb202a20e268fcb195d Mon Sep 17 00:00:00 2001 From: Hillel Coren Date: Wed, 21 Sep 2016 15:21:14 +0300 Subject: [PATCH] Merge textarea height fix --- resources/views/invoices/edit.blade.php | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/resources/views/invoices/edit.blade.php b/resources/views/invoices/edit.blade.php index 5b6fa1aed5..016f423b7f 100644 --- a/resources/views/invoices/edit.blade.php +++ b/resources/views/invoices/edit.blade.php @@ -263,7 +263,7 @@ + rows="1" cols="60" style="resize: vertical;height:42px" class="form-control word-wrap"> @@ -1108,9 +1108,7 @@ }); $('textarea').on('keyup focus', function(e) { - while($(this).outerHeight() < this.scrollHeight + parseFloat($(this).css("borderTopWidth")) + parseFloat($(this).css("borderBottomWidth"))) { - $(this).height($(this).height()+1); - }; + $(this).height(0).height(this.scrollHeight-18); }); }