PDA

View Full Version : [FIXED-302] Destroyed cmp is still isVisible()



Kask
15 Sep 2010, 6:08 AM
After destroying an component, isVisible() will still return true.

Suggestion to new isVisible method...



/**
* Returns true if this component is visible.
* @return {Boolean} True if this component is visible, false otherwise.
*/
isVisible: function() {
var visible = !this.hidden,
destroyed = this.isDestroyed,
cmp = this.ownerCt;

if(destroyed) {
return false;
}

if (visible && this.rendered && cmp) {
while (cmp) {
if (cmp.hidden || cmp.collapsed || cmp.isDestroyed) {
visible = false;
break;
}
cmp = cmp.ownerCt;
}
}
return visible;
}

aconran
15 Sep 2010, 3:14 PM
Thanks for the bug report.

rdougan
16 Sep 2010, 3:32 PM
Thanks - fixed in the next release (.96). :)