Thank you for reporting this bug. We will make it our priority to review this report.
  1. #1
    Sencha - Community Support Team mankz's Avatar
    Join Date
    Nov 2007
    Location
    Helsingborg, Sweden
    Posts
    2,455
    Vote Rating
    48
    mankz is a jewel in the rough mankz is a jewel in the rough mankz is a jewel in the rough

      0  

    Default [2.1] Ext.Element.select broken

    [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 - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    St. Louis, MO
    Posts
    33,599
    Vote Rating
    434
    mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of

      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 @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    http://www.JSONPLint.com - Source to lint your JSONP!

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

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is almost in print!

    When posting code, please use BBCode's CODE tags.

  3. #3

  4. #4
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    St. Louis, MO
    Posts
    33,599
    Vote Rating
    434
    mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of

      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 @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    http://www.JSONPLint.com - Source to lint your JSONP!

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

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is almost in print!

    When posting code, please use BBCode's CODE tags.

  5. #5
    Sencha - Community Support Team mankz's Avatar
    Join Date
    Nov 2007
    Location
    Helsingborg, Sweden
    Posts
    2,455
    Vote Rating
    48
    mankz is a jewel in the rough mankz is a jewel in the rough mankz is a jewel in the rough

      0  

    Default


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