diff --git a/www/manager6/Toolkit.js b/www/manager6/Toolkit.js index 263dea16..ff59a55a 100644 --- a/www/manager6/Toolkit.js +++ b/www/manager6/Toolkit.js @@ -112,6 +112,39 @@ Ext.override(Ext.form.field.ComboBox, { } }); +// ExtJs 5-6 has an issue with caching +// see https://www.sencha.com/forum/showthread.php?308989 +Ext.define('PVE.UnderlayPool', { + override: 'Ext.dom.UnderlayPool', + + checkOut: function () { + var cache = this.cache, + len = cache.length, + el; + + // do cleanup because some of the objects might have been destroyed + while (len--) { + if (cache[len].destroyed) { + cache.splice(len, 1); + } + } + // end do cleanup + + el = cache.shift(); + + if (!el) { + el = Ext.Element.create(this.elementConfig); + el.setVisibilityMode(2); + // + // tell the spec runner to ignore this element when checking if the dom is clean + el.dom.setAttribute('data-sticky', true); + // + } + + return el; + } +}); + Ext.define('Ext.ux.IFrame', { extend: 'Ext.Component',