Prevent textarea height from shrinking

This commit is contained in:
Hillel Coren 2016-10-30 13:28:01 +02:00
parent 7e7b727422
commit ad6e5cc29d

View File

@ -341,11 +341,11 @@
<div class="tab-content"> <div class="tab-content">
<div role="tabpanel" class="tab-pane active" id="notes" style="padding-bottom:44px"> <div role="tabpanel" class="tab-pane active" id="notes" style="padding-bottom:44px">
{!! Former::textarea('public_notes')->data_bind("value: public_notes, valueUpdate: 'afterkeydown'") {!! Former::textarea('public_notes')->data_bind("value: public_notes, valueUpdate: 'afterkeydown'")
->label(null)->style('resize: none; width: 500px;')->rows(4) !!} ->label(null)->style('width: 500px;')->rows(4) !!}
</div> </div>
<div role="tabpanel" class="tab-pane" id="terms"> <div role="tabpanel" class="tab-pane" id="terms">
{!! Former::textarea('terms')->data_bind("value:terms, placeholder: terms_placeholder, valueUpdate: 'afterkeydown'") {!! Former::textarea('terms')->data_bind("value:terms, placeholder: terms_placeholder, valueUpdate: 'afterkeydown'")
->label(false)->style('resize: none; width: 500px')->rows(4) ->label(false)->style('width: 500px')->rows(4)
->help('<div class="checkbox"> ->help('<div class="checkbox">
<label> <label>
<input name="set_default_terms" type="checkbox" style="width: 24px" data-bind="checked: set_default_terms"/>'.trans('texts.save_as_default_terms').' <input name="set_default_terms" type="checkbox" style="width: 24px" data-bind="checked: set_default_terms"/>'.trans('texts.save_as_default_terms').'
@ -357,7 +357,7 @@
</div> </div>
<div role="tabpanel" class="tab-pane" id="footer"> <div role="tabpanel" class="tab-pane" id="footer">
{!! Former::textarea('invoice_footer')->data_bind("value:invoice_footer, placeholder: footer_placeholder, valueUpdate: 'afterkeydown'") {!! Former::textarea('invoice_footer')->data_bind("value:invoice_footer, placeholder: footer_placeholder, valueUpdate: 'afterkeydown'")
->label(false)->style('resize: none; width: 500px')->rows(4) ->label(false)->style('width: 500px')->rows(4)
->help('<div class="checkbox"> ->help('<div class="checkbox">
<label> <label>
<input name="set_default_footer" type="checkbox" style="width: 24px" data-bind="checked: set_default_footer"/>'.trans('texts.save_as_default_footer').' <input name="set_default_footer" type="checkbox" style="width: 24px" data-bind="checked: set_default_footer"/>'.trans('texts.save_as_default_footer').'
@ -1118,7 +1118,7 @@
refreshPDF(true); refreshPDF(true);
}); });
$('textarea').on('keyup focus', function(e) { $('textarea.word-wrap').on('keyup focus', function(e) {
$(this).height(0).height(this.scrollHeight-18); $(this).height(0).height(this.scrollHeight-18);
}); });