I adapted the native ExtJs5 cacheRefEls-function defined inside ext-all-debug.js into the following, after putting multiple console.log() into it, which indicated that the dom is not returning a tree:
cacheRefEls: function(el) {
el = el || this.el;
var cache = null;
try{
cache = Ext.cache,
El = Ext.dom.Element,
dom = el.isElement ? el.dom : el,
refs = dom.querySelectorAll('[data-ref]'),
len = refs.length,
ref, i;
//console.log("Success: 'Nodelist' returned by 'el.dom.querySelectorAll('[data-ref]')' for el--->"+el + " 'cache-variable is set!'");
}catch(err){
//console.log("Error: No 'Nodelist' returned by 'el.dom.querySelectorAll('[data-ref]')' for el--->"+el + " 'Couldn't set cache-variable!'");
}
for (i = 0; i < len; i++) {
ref = refs[i];
if (!cache[ref.id]) {
new El(ref);
}
}
}
This avoids that the dom-tree is accessed for el's that do not have such a tree, like for example Text-objects.
P.S.: Use this fix with care, because it fiddles around with the native code provided by Sencha.