View Full Version : [FIXED][3.0.0] setIconClass() on collapsible Ext.Panel creates duplicate panel icon

16 Jul 2009, 7:52 AM
Ext version tested:
Ext 3.0.0
Adapter used:
Browser versions tested against:
FF3.5 (firebug 1.4.0b7 installed)
Operating System:
WinXP Pro

When Ext.Panel with collapsible = true and iconCls != '' has been rendered, calling setIconClass(newIconCls) does not replace the first panel icon, instead the second icon is shown alongside the first icon.

Test Case:
Copy-paste the following HTML page in examples folder and launch in browser:

<link rel="stylesheet" type="text/css" href="../resources/css/ext-all.css" />
<link rel="stylesheet" type="text/css" href="shared/examples.css" />
<link rel="stylesheet" type="text/css" href="shared/icons/silk.css" />
<script type="text/javascript" src="../adapter/ext/ext-base.js"></script>
<script type="text/javascript" src="../ext-all.js"></script>
<script type="text/javascript" src="shared/examples.js"></script>
<script type="text/javascript">
Ext.BLANK_IMAGE_URL = '../resources/images/default/s.gif';
var p = new Ext.Panel({
title: 'My Panel',
renderTo: 'panel-basic',
iconCls: 'icon-arrow-up',
html: Ext.example.bogusMarkup,
tbar: [
text: 'Change Icon',
handler: function(b, e) {
<div id="panel-basic" class="container"></div>
</html>Steps to reproduce the problem:
Launch the above HTML page in browser
Click 'Change Icon' toolbar button
The result that was expected:
The up arrow icon is replaced by down arrow icon
The result that occurs instead:
The down arrow icon appears to the left of the up arrow icon
In IE8, the 'toggle' tool is pushed downward in the panel header area the moment the second icon appears
Extra note:
This bug does not occur if the panel is not collapsible, or if the first panel icon was set using setIconClass() as well.
The bug has been around since 2.2.x (bug report: http://extjs.com/forum/showthread.php?t=49225)

16 Jul 2009, 8:04 AM
Fixed in the trunk, both versions, thanks for the report.

16 Jul 2009, 8:08 AM
Thanks evant! This is my second bug report and like my first one, you fixed it in no time. You are simply awesome! :D

16 Jul 2009, 3:49 PM
Thanks evant! This is my second bug report and like my first one, you fixed it in no time. You are simply awesome! :D

Yeah, see what happens when you post a complete bug report? ;)