jeudi 24 avril 2014

textarea width shrinks when invalid mark is set

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?

Code:



<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.


Aucun commentaire:

Enregistrer un commentaire