PDA

View Full Version : [FIXED] panel.hide(true) with panel.preventHeader=true



PHaroZ
4 Nov 2011, 3:56 AM
Ext 4.0.7, in debug mode.

If I call "panel.hide(true)" on panel configured with "preventHeader=true" I've a bug :

this.header is undefined
https://demo-localhost/static/js/ext/4.0.7/ext-all-debug.js?_v=2.2.0.4
Line 38503

This is due to

var tools = [], headerTools = this.header.query('tool[hidden=false]');

in "ghostTools" method. "preventHeader" cause "this.header" is undefined.

I think that "ghostTools" shouldn't be call if there is no header.

mitchellsimoens
4 Nov 2011, 7:34 AM
You aren't using hide correctly. hide method takes 3 arguments, animTarget, callback, scope. animTarget is only valid if the panel is floating and has to be an element, component, or an id. You are passing true which is not valid.

http://docs.sencha.com/ext-js/4-0/#!/api/Ext.panel.Panel-method-hide

evant
5 Nov 2011, 7:20 PM
@PHaroZ

Agree. Will fix it up for 4.1.