PDA

View Full Version : Possible bug with menu in button [4.2.1[



clifficious
13 Jun 2013, 5:25 AM
Hi,

I have following code



Ext.create('Ext.button.Button', {
itemId : 'routingMenuButton',
text : Locales.routing_buttonLabel,
iconCls : 'icon-map',
menu : {
xtype : 'menu',
itemId : 'routeMenu',
width : 190,
items : [ {
xtype : 'menuitem',
text : Locales.routing_newRoute,
itemId : 'routingSettingsButton',
iconCls : 'icon-add'
}, {
xtype : 'menuitem',
text : Locales.routing_myRoutes,
itemId : 'myRoutesButton',
iconCls : 'icon-star',
disabled: true,
tooltip: Locales.login_pleaseLogin,
menu : {
xtype : 'menu',
plain : true,
itemId : 'myRouteMenu',
width : 350,
items : [ {
xtype : 'myroutespanel',
} ]
}


} ]
}
})

in 4.2.0 it all looks fine. 44355

But after upgrading to 4.2.1 the arrow indicating a menu is always rendered at the bottom. 44354

Is there a way to fix this?

Thanks in advance!

slemmon
16 Jun 2013, 9:39 PM
I tried to recreate the issue you're seeing using the below test case, but wasn't seeing the issue with 4.2.1 with the classic or the Neptune themes. Do you have some additional CSS you're using on top of the framework CSS? What browser is this in that you're seeing the issue (I tested in Chrome)? Do you see the menu arrows rendered correctly when you open this example from 4.2.1?
http://docs.sencha.com/extjs/4.2.1/extjs-build/examples/build/KitchenSink/ext-theme-neptune/#basic-buttons



Ext.create('Ext.button.Button', {
renderTo: document.body,
itemId: 'routingMenuButton',
text: 'Text',
iconCls: 'icon-map',
menu: {
xtype: 'menu',
itemId: 'routeMenu',
width: 190,
items: [{
xtype: 'menuitem',
text: 'Text',
itemId: 'routingSettingsButton',
iconCls: 'icon-add'
}, {
xtype: 'menuitem',
text: 'Text',
itemId: 'myRoutesButton',
iconCls: 'icon-star',
disabled: true,
tooltip: 'Text',
menu: {
xtype: 'menu',
plain: true,
itemId: 'myRouteMenu',
width: 350,
items: [{
text: 'myroutespanel',
}]
}
}]
}
});

clifficious
17 Jun 2013, 2:48 AM
Thanks for your hint! As I'm using a custom theme, I noticed, that it was build with 4.2.0. Just rebuild it with 4.2.1 and the error is gone. Seems like the CSS file from 4.2.0 does have some slight compatibility problems.

But works now! Thanks once again for the hint!