PDA

View Full Version : textarea width shrinks when invalid mark is set



XPEHBAM
24 Apr 2014, 5:37 PM
Hi All,I'm running into an issue where the textfield shrinks to 150px when the maximum amount of data is entered. The field is configured with enforceMaxPolicy: {xtype: textarea, maxLength: 256, enforceMaxLength: true}. It looks like EXTJS is generating the HMTL with hardcoded width style, but I can't see where in the code that's happening. Is there any way to avoid this?
<table id="job_id" class="x-field x-form-item x-form-dirty x-column x-field-default x-column-form-item x-form-invalid" style="border-width: 0px; width: 95%; height: 45px; margin: 9px; table-layout: fixed;" cellpadding="0"><tbody><tr><td id="job_id-labelCell" colspan="3" style="" class="x-field-label-cell"><label id="job_id-labelEl" for="job_id-inputEl" class="x-form-item-label x-form-item-label-top" style="margin-bottom:5px;">Job ID:</label></td></tr><tr id="job_id-inputRow"><td class="x-form-item-body " id="job_id-bodyEl" role="presentation" colspan="2" style="width: 150px;"><textarea id="job_id-inputEl" name="job_id-inputEl" rows="4" cols="20" maxlength="256" class="x-form-field x-form-text x-form-invalid-field" style="width: 100%; height: 27px;" autocomplete="off" aria-invalid="true" data-errorqtip="<ul><li>The maximum length for this field is 256</li></ul>">COPY_testlongtestlongtestlongtestlongtestlongtestlongtestlongtestlongtestlongtestlongtestlongtestlongtestlongtestlongtestlongtestlongtestlongtestlongtestlongtestlongtestlongtestlongtestlongtestlongtestlongtestlongtestlongtestlongtestlongtestlongtestlongtestlong</textarea></td></tr></tbody></table>Changed TABLE to TABL so the forum doesn't reformat the code.

scottmartin
28 Apr 2014, 11:22 AM
Please provide a working test case, not the resulting html.