PDA

View Full Version : Color Menu Item Bug



John Huang
29 Mar 2007, 10:17 PM
In IE, if two color items in the same page, would get an error. Here is the code, notify that there are two "pick a color" items:


new Ext.Toolbar.MenuButton({
text: 'Split Button',
handler: onButtonClick,
cls: 'x-btn-text-icon blist',
// Menus can be built/referenced by using nested menu config objects
menu : {items: [
{text: 'Bold', handler: onItemClick},
{text: 'Italic', handler: onItemClick},
{text: '<u>Underline</u>', handler: onItemClick}, '-',{
text: 'Pick a Color', handler: onItemClick, menu: {
items: [
new Ext.menu.ColorItem({selectHandler:function(cp, color){
Ext.example.msg('Color Selected', 'You chose {0}.', color);
}}), '-',
{text:'More Colors...', handler:onItemClick}
]
}},
{
text: 'Pick a Color', handler: onItemClick, menu: {
items: [
new Ext.menu.ColorItem({selectHandler:function(cp, color){
Ext.example.msg('Color Selected', 'You chose {0}.', color);
}}), '-',
{text:'More Colors...', handler:onItemClick}
]
}},
{text: 'Extellent!', handler: onItemClick}
]}
}), '-', {
text: 'Toggle Me',
enableToggle: true,
toggleHandler: onItemToggle,
pressed: true
});

rodiniz
2 Apr 2007, 4:10 AM
I have the same problem in my editor sample.
http://www.rodrigodiniz.qsh.eu/editor.htm

jack.slocum
2 Apr 2007, 6:29 AM
This is now fixed in SVN.