-
#setTitle( undefined )
Ext version tested:Browser versions tested against:Description:- Ext.Toolbar - #setTitle( undefined ) causes a render error.
Steps to reproduce the problem:- new Ext.Toolbar().setTitle( undefined )
The result that was expected:- I should think that it would simply clear the title
The result that occurs instead:- Uncaught TypeError: Cannot read property 'firstChild' of undefined
- sencha-touch-all-debug.js:11842
Test Case:
see reproduce
HELPFUL INFORMATION
Operating System:
-
Can I get a test case? Tested against 2.1.0 b1, 2.0.2 and 2.0.1.1 with both these test cases and do not get an error:
Code:
new Ext.Toolbar().setTitle(undefined);
Code:
var cnt = new Ext.Container({
fullscreen : true,
items : [
{
xtype : 'toolbar',
docked : 'top'
}
]
});
var toolbar = cnt.down('toolbar');
toolbar.setTitle(undefined);
-
Thanks for the response.
Hmm I didn't try a unit test. It doesn't throw an error this way (not sure what I screwed up in my code); however, setting the title after passing undefined doesn't seem to work.
Code:
var cnt = new Ext.Container({ fullscreen : true, items : [ { xtype : 'toolbar', docked : 'top' } ]});var toolbar = cnt.down('toolbar');toolbar.setTitle(undefined);toolbar.setTitle('some title');
-
Ugh that didn't format very well.
Code:
var cnt = new Ext.Container({
fullscreen : true,
items : [
{
xtype : 'toolbar',
docked : 'top'
}
]
});
var toolbar = cnt.down('toolbar');
toolbar.setTitle(undefined);
toolbar.setTitle( 'some title' );
-
This is working for me:
Code:
var cnt = new Ext.Container({
fullscreen : true,
items : [
{
xtype : 'toolbar',
docked : 'top'
}
]
});
var toolbar = cnt.down('toolbar');
toolbar.setTitle(undefined);
toolbar.setTitle('Test');
-
Not really sure. I put a workaround in for now anyway.
Here's the exact build I'm using:
(debug version)
Build date: 2012-06-04 15:34:28 (d81f71da2d56f5f71419dc892fbc85685098c6b7)
-
This bug still exists in 2.1.0.