Results 1 to 5 of 5

Thread: [2.1] Ext.Element.select broken

    Thank you for reporting this bug. We will make it our priority to review this report.
  1. #1
    Sencha Premium User mankz's Avatar
    Join Date
    Nov 2007
    Location
    Stockholm, Sweden
    Posts
    3,078
    Vote Rating
    184
      0  

    Default [2.1] Ext.Element.select broken

    Seems Element.select selects globally, very unexpected.

    Code:
    Ext.getBody().setHtml('<div id="mydiv"><img/></div><img/>');
    console.log(Ext.get('mydiv').select('img').getCount());
    Ext JS gets it right, shows 1:
    ST 2.1 shows 2.

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

    Default

    For ST 2.1, this works for me:

    Code:
    Ext.getBody().setHtml('<div id="mydiv"><img/></div><img/>');
    console.log(Ext.get('mydiv').select('img').getCount());
    It gives 1 for the getCount. Had to change the update method to setHtml to be ST2 compliant.
    Mitchell Simoens @LikelyMitch
    Sencha Inc, Senior Software Engineer
    ________________
    Learn BBCode and use it! Checkout the CODE tag!

    Check out my GitHub, lots of nice things for Ext JS and Sencha Touch
    https://github.com/mitchellsimoens

  3. #3

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

    Default

    I see what the issue is now, the actual root isn't being passed properly and this bug is causing it: http://www.sencha.com/forum/showthread.php?247600
    Mitchell Simoens @LikelyMitch
    Sencha Inc, Senior Software Engineer
    ________________
    Learn BBCode and use it! Checkout the CODE tag!

    Check out my GitHub, lots of nice things for Ext JS and Sencha Touch
    https://github.com/mitchellsimoens

  5. #5
    Sencha Premium User mankz's Avatar
    Join Date
    Nov 2007
    Location
    Stockholm, Sweden
    Posts
    3,078
    Vote Rating
    184
      0  

    Default

    Yup, that seems to be it - now dump this case into your test suite

Posting Permissions

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