PDA

View Full Version : aligning tbar button right causes it to overflow until window is resized



JackJohnsonX
25 Mar 2015, 7:17 PM
hello,

I have a panel with top toolbar which contains one button pushed all the way to the right. Initially, the button overflows and gets cut off until the window is resized, then it automatically adjusts.



//toolbar inside panel initComponent
this.dockedItems = [{
xtype:"toolbar",
dock:"top",
style:"background-color:#d8d8d8;",
layout:{pack:"end"},
items:[
//"->",
{
xtype:"button", text:"Welcome", itemId:"userid",
menu: new Ext.menu.Menu({
items:[{icon:"blah.png", scope:this,text:"Logout", itemId:"logout", handler:function(){this.fireEvent("logout");}}]
})
}

}];


Even if I resize the window by 1 pixel whether vertically or horizontally the whole button becomes visible and it automatically adjusts. If i have debugger console open and close it the button will adjust.

layout:{pack:"end"} and "->" the shortcut for xtype:"tbfill" both cause the button to overflow.

I used the CSS "left" property to bypass this issue but it creates issues on screens with lower resolutions (4:3)

Gary Schlosberg
30 Mar 2015, 2:16 PM
I wasn't able to reproduce this. In which version are you seeing this? Which browser?