View Full Version : [FIXED] 2.1.0rc2 - Element.traversal.js overwrites Element.select with broken implementation

30 Oct 2012, 2:53 PM
The file /touch/src/dom/Element.traversal.js, which is not referenced anywhere in the docs, overwrites the Element.select implementation referenced in the docs (http://docs.sencha.com/touch/2-0/source/CompositeElementLite.html#Ext-dom-Element-method-select) with this one:

select: function(selector, composite) {
return Ext.dom.Element.select(selector, this.dom, composite);

...which gets the parameters to Ext.dom.Element.select wrong, causing the select to find elements across the entire document rather than within the scope of the element


30 Oct 2012, 4:16 PM
Thanks for the report! I have opened a bug in our bug tracker.

15 Dec 2012, 4:54 PM
This is still broken in 2.1 GA... how many devs are pulling their hair out from Element.select misbehaving?

28 Apr 2013, 12:53 PM
I can't believe Element.select is still completely broken and the documented params for Ext.select are still wrong in 2.2:

Test to reproduce:

Open http://docs.sencha.com/touch/2.2.0/touch-build/examples/kitchensink/index.html

In the console, compare the results of these two expressions:

Ext.dom.Element.select('.x-inner', false, 'mainNavigationBar').getCount();


Jamie Avins
29 Apr 2013, 10:34 AM
The static method has 3 arguments, the instance's has 2 since the root is the instance itself.

Documentation fixed for both methods and the instance's and the instance was sending the arguments in the wrong order and has been fixed.