Results 1 to 2 of 2

Thread: Label always rendered with a “for” attribute (at least in 4.1.1)

    Looks like we can't reproduce the issue or there's a problem in the test case provided.
  1. #1
    Sencha User
    Join Date
    Dec 2012
    Posts
    13
    Vote Rating
    0
      0  

    Default Label always rendered with a “for” attribute (at least in 4.1.1)

    Accordingly with ExtJS 4.1.3 documentation the “forid” attribute should not be added if not specified.

    I added a standalone Label, not correlated to a field, in a Panel and I noticed a strange “getElementById() called with an empty string” in the Firebug console.

    Investigating a bit I found that the culprit was the Label, that was rendered with an empty “for” attribute (that is, “... for="" ...”): the warning appears each time the mouse steps over the label.

    In the Ext.form.Label.getElConfig() method I see that the configuration is passed to the superclass with
    Code:
    Ext.apply(me.callParent(), {htmlFor: me.forId || ''})
    that seems wrong to me.

    test case:

    Code:
    new Ext.container.Container({
        renderTo : document.body,
        items    : [
            {
                xtype : 'label',
                html  : 'Hi'
            }
        ]
    });
    Last edited by mitchellsimoens; 6 Dec 2012 at 8:15 AM. Reason: Added testcase to post

  2. #2
    Sencha - Sr Software Engineer mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    39,695
    Vote Rating
    1279
      0  

    Default

    Thanks for the report! I have opened a bug in our bug tracker.

Posting Permissions

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