-
26 Sep 2012 12:24 PM #1
Toolbar setVisible logic broken with enableOverflow is true
Toolbar setVisible logic broken with enableOverflow is true
REQUIRED INFORMATION
Ext version tested:- Ext 4.1.1
- Chrome 23.0.1271.6 dev-m
- When enableOverflow is set to true in a toolbar, the setVisible method doesn't actually toggle the visibility of any items that are in the toolbar
- Make a toolbar with enableOverflow true
- put in enough items that the overflow menu appears
- try to use setVisible(false) on a child item that is now in the menu
- Item should be invisible
- Item is still visible
Code:var button1 = new Ext.button.Button({ text: 'Button1' }); var button2 = new Ext.button.Button({ text: 'Button2' }); var button3 = new Ext.button.Button({ text: 'Button3' }); var button4 = new Ext.button.Button({ text: 'Button4' }); var button5 = new Ext.button.Button({ text: 'Button5' }); var button6 = new Ext.button.Button({ text: 'Button6' }); new Ext.button.Button({ text: 'Make 4,5,6 invisible', renderTo: document.body, handler: function() { button4.setVisible(false); button5.setVisible(false); button6.setVisible(false); } }); new Ext.button.Button({ text: 'Make 4,5,6 visible', renderTo: document.body, handler: function() { button4.setVisible(true); button5.setVisible(true); button6.setVisible(true); } }); new Ext.toolbar.Toolbar({ renderTo: document.body, width : 200, enableOverflow: true, items: [button1, button2, button3, button4, button5, button6] });
HELPFUL INFORMATION
See this URL for live test case:Possible fix:- not provided
- Windows 7 version 6.1(Build 7601: Service Pack 1)
Last edited by arun_v; 26 Sep 2012 at 12:47 PM. Reason: made toolbar width smaller (from 800 to 200) so that menu will appear
-
26 Sep 2012 12:32 PM #2Sencha - Senior Forum Manager
- Join Date
- Mar 2007
- Location
- St. Louis, MO
- Posts
- 33,714
- Vote Rating
- 438
So you are saying that the setVisible should toggle the menu items in the overflow menu correct?
Mitchell Simoens @SenchaMitch
Sencha Inc, Senior Forum Manager
________________
http://www.JSONPLint.com - Source to lint your JSONP!
Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
https://github.com/mitchellsimoens
Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/
Need more help with your app? Hire Sencha Services services@sencha.com
Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is almost in print!
When posting code, please use BBCode's CODE tags.
-
26 Sep 2012 12:45 PM #3
Correct. It seems like it should follow like that since the overflow menu is enabled with just a boolean in the toolbar config.
-
27 Sep 2012 4:44 AM #4Sencha - Senior Forum Manager
- Join Date
- Mar 2007
- Location
- St. Louis, MO
- Posts
- 33,714
- Vote Rating
- 438
Thanks for the report! I have opened a bug in our bug tracker.
You found a bug! We've classified it as
EXTJSIV-7367
.
We encourage you to continue the discussion and to find an acceptable workaround while we work on a permanent fix.


Reply With Quote