Results 1 to 1 of 1

Thread: Missing readonly cls on field when readOnly is set in fieldDefaults

    Thank you for reporting this bug. We will make it our priority to review this report.
  1. #1
    Sencha Premium Member rkleinkromhof's Avatar
    Join Date
    Apr 2013
    Location
    Enschede, The Netherlands
    Posts
    53

    Default Missing readonly cls on field when readOnly is set in fieldDefaults

    Setting readOnly: true renders the field with x-form-readonly and its input tag with the proper readonly attributes.


    When readOnly: true is set by fieldDefaults, the x-form-readonly cls is not present on the rendered field. The input's readonly tags, however, are correctly set.

    See Fiddle example:
    • run the example
    • see that the first textfield does not have its text colored grey or have the '<= readOnly' content added to it (which is applied to all x-form-readonly classes, configured in style.css)


    Tested on:

    • Chrome, Ext JS 6.2.0.981 classic (Neptune & Triton)
    • Chrome, Ext JS 6.2.1.167 classic (Neptune & Triton)


    Expected: field with readOnly: true set by fieldDefaults to render with x-form-readonly.
    Got: no x-form-readonly on rendered field.

    This could be because Ext.form.Labelable#setFieldDefaults only sets property values instead of using that property's setter method. if available. When setFieldDefaults is called, the component is already initialized, but is still in the process of rendering. At this point just applying default values does not seem to cut it.
    Last edited by rkleinkromhof; 29 Nov 2016 at 2:12 AM. Reason: added reproduction path

Similar Threads

  1. Replies: 1
    Last Post: 16 Mar 2015, 3:54 PM
  2. Replies: 1
    Last Post: 1 Feb 2013, 5:41 AM
  3. Set field as readOnly on the fly
    By deblasio in forum Ext 2.x: Help & Discussion
    Replies: 8
    Last Post: 1 Dec 2011, 3:52 PM
  4. [CLOSED]readOnly radio buttons not honoring readOnly
    By ValterBorges in forum Ext 3.x: Bugs
    Replies: 4
    Last Post: 8 Jun 2010, 12:24 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •