View Full Version : [FIXED][3.x] Cyclebutton
galdaka
5 May 2009, 12:02 AM
Hi,
Strange issue with Cyclebutton. For reproduce it:
1) Open feed-viewer example.
2) In "Reading Panel" cyclebutton click in arrow and select "Right".
3) Click in the cyclebutton (Not in arrow) for cycle.
Error in line 16605:
this.layout.setActiveItem(item);
Enviroment:
IE6, IE7 and FF2.
Greetings,
This was just a bug in the example, not the component. Fixed in SVN.
anotherpit
27 May 2009, 10:38 AM
@evant
I got the same bug here. The problem's not in your example. Here's a simple demo:
Ext.onReady(function() {
new Ext.CycleButton({
showText : true,
renderTo : Ext.getBody(),
items : [
{ text : 'one', checked : true },
{ text : 'two' },
{ text : 'three' }
]
});
});
Now, if you:
1. click arrow
2. check any item that's not checked
3. click the cycle button itself
you have that very error:
this.layout.setActiveItem is not a function
The problem's in activating and deactivating menu items. To cut the long story short, just fix the Ext.menu.Menu.deactivateActive() method as follows:
Ext.override(Ext.menu.Menu, {
deactivateActive: function(){
var a = this.activeItem;
if(a){
if(a.isFormField){
//Fields cannot deactivate, but Combos must collapse
if(a.collapse){
a.collapse();
}
}else{
a.deactivate();
}
// this.activeItem = null;
delete this.activeItem;
}
}
});
aconran
27 May 2009, 11:13 AM
@anotherpit, Thanks for the additional information.
Marking this thread as open again.
evant
27 May 2009, 6:59 PM
Fixed in SVN, thanks.
Powered by vBulletin® Version 4.2.3 Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.