PDA

View Full Version : [OPEN] Ext.get contract broken



mankz
26 Oct 2012, 1:40 AM
The contract of Ext.get is to 'get' an element from the DOM. Seems broken to me:



Ext.getBody().setHtml('<div id="foo">CRAP</div>');
console.log(Ext.get('foo').dom.innerHTML); >>"CRAP"

Ext.getBody().setHtml('<div id="foo">AWESOME</div>');

console.log(Ext.get('foo').dom.innerHTML) // >> "CRAP"


Cache is not busted as I overwrite some element. Docs say this should work.

http://docs.sencha.com/touch/2-0/#!/api/Ext-method-get


Uses simple caching to consistently return the same object. Automatically fixes if an object was recreated with the same id via AJAX or DOM.

mitchellsimoens
26 Oct 2012, 7:43 AM
Thanks for the report! I have opened a bug in our bug tracker.

mankz
2 Nov 2012, 9:32 AM
Any news on this one?

mankz
11 Dec 2012, 4:35 AM
mega-bump?

mitchellsimoens
11 Dec 2012, 6:27 AM
This bug report is still open. Has not been worked on yet.

mankz
21 Mar 2013, 10:03 PM
Bumpers, any update?

mankz
16 Apr 2013, 11:38 AM
Coming up on 6 months for this, can we please just get it fixed? Still broken in 2.2. Ext.get just _has_ to work according to docs, imagine if in jQuery you could not trust


$('.foo')

I think that's kind of a critical one.

saklak
25 Jun 2013, 12:18 PM
Still nothing about this ?

It seams that Ext.get cache isn't cleared not even on component destroy.



Ext.Viewport.getActiveItem().destroy();

Ext.Element.cache is the same before and after the above.

saklak
27 Jun 2013, 10:50 AM
Ext.event.Dom.getTarget()

is also affected about this, if you set [returnEl] true, check the source code.

Of course there are workarounds for this, but still...

mankz
27 Jun 2013, 11:40 AM
Closing in on a year for this ticket, can we get some official love for it?