PDA

View Full Version : [FIXED-455][3.1] Tabpanel throws js error on tab-edge click



draduc
19 Jan 2010, 10:26 AM
Since i haven't seen this error on the example pages using tab panel i thought i'd post this here first rather than post it in the bugs section.

Clicking on the right edge of the last item in the tab strip throws a js error:



item is undefined
_script/lib/ext/ext-all-debug-310.js
Line 26106


http://www.extjs.com/forum/attachment.php?attachmentid=18347&stc=1&d=1263925329

In the example posted below, clicking on the outer edge of "tab 2" (red line on the edge of tab 2 in the attached image) throws the above posted error.



<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<!-- ** CSS ** -->
<!-- ** lib ** -->
<link type="text/css" rel="Stylesheet" href="script/lib/ext/resources/css/ext-all.css" />
<!-- ** lib-ux ** -->
<!-- ** lib-overrides ** -->
<!-- ** JS ** -->
<!-- ** lib ** -->
<script type="text/javascript" src="script/lib/ext/adapter/ext/ext-base-debug.js"></script>
<script type="text/javascript" src="script/lib/ext/ext-all-debug.js"></script>
<!-- ** lib-overrides ** -->
</head>
<body>
<script type="text/javascript">
Ext.onReady(function(){
var win;
win = new Ext.Window({
width:400,
height:300,
items:[
{
xtype:'tabpanel',
items:[
{
title:'tab1'
},
{
title:'tab2'
}
]
}
]
});
win.show();
});
</script>
</body>
</html>

jsakalos
19 Jan 2010, 10:40 AM
It's a bug. Clicking on third <li> item of the tab panel, x-tab-edge, throws the error. I'm moving the thread to Bugs.

evant
19 Jan 2010, 11:13 AM
A fix for this has been added in rev 5918, can you confirm the fix?

jsakalos
19 Jan 2010, 12:54 PM
Unfortunately, it's still there (rev 5918), in this method:


findTargets : function(e){
42432 var item = null;
42433 var itemEl = e.getTarget('li', this.strip);
42434 if(itemEl){
42435 item = this.getComponent(itemEl.id.split(this.idDelimiter)[1]);
item is undefined42436 if(item.disabled){
42437


(line numbers pasted from firebug.

evant
19 Jan 2010, 1:25 PM
I think you have the wrong version, try again.

Jamie Avins
19 Jan 2010, 1:32 PM
Yes, that selector is not what is in 5918.

jsakalos
19 Jan 2010, 2:07 PM
Sorry, was running from 3.1.x branch, not from the trunk. So it is fixed.