-
5 Oct 2010 7:54 AM #1
[OPEN-1312] Menu with maxHeight has incorrect aligning
[OPEN-1312] Menu with maxHeight has incorrect aligning
Hi,
If define maxHeight for the menu then the menu is shown at incorrect position
Please see the following sample
Code:<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <title>Toolbar with Menus</title> <link rel="stylesheet" type="text/css" href="../../resources/css/ext-all.css" /> <!-- GC --> <!-- LIBS --> <script type="text/javascript" src="../../adapter/ext/ext-base.js"></script> <!-- ENDLIBS --> <script type="text/javascript" src="../../ext-all.js"></script> <script type="text/javascript"> Ext.onReady(function(){ var tb = new Ext.Toolbar(); tb.render('toolbar'); var scrollMenu = new Ext.menu.Menu({maxHeight:200}); for (var i = 0; i < 50; ++i){ scrollMenu.add({ text: 'Item ' + (i + 1) }); } // scrollable menu tb.add({ text: 'Scrolling Menu', menu: scrollMenu }); tb.doLayout(); }); </script> </head> <body> <br /><br /><br /><br /><br /> <div id="container"> <div id="toolbar"></div> </div> <br /><br /><br /><br /><br /> </body> </html>
-
8 Oct 2010 12:43 AM #2Sencha - Community Support Team
- Join Date
- Mar 2007
- Location
- The Netherlands
- Posts
- 24,251
- Vote Rating
- 41
I tried to fix the y calculation in constrainScroll, but I couldn't.
The returnY only needs to be increased (and NOT decreased!) if:
1. The menu was top aligned.
2. The menu was bottom aligned, but pushed up by the '?' constraint.
but unfortunately, alignment information is not available in constrainScroll.
To do this correctly showAt will have to be modified, so it determines the height of the menu first and then aligns it.
Thank you for reporting this bug. We will make it our priority to review this report.
Similar Threads
-
Toolbar Oveflow Menu is not properly aligning based on the browser viewport
By BulletzBill in forum Ext 3.x: Help & DiscussionReplies: 7Last Post: 6 Sep 2010, 1:10 PM -
Menu - wrong position when using enableScrolling and maxHeight
By kamalhg in forum Ext 3.x: Help & DiscussionReplies: 2Last Post: 10 May 2010, 4:08 AM -
[OPEN-947] Menu - wrong position when using enableScrolling with maxHeight
By kamalhg in forum Ext 3.x: BugsReplies: 0Last Post: 10 May 2010, 4:06 AM -
[FIXED-560] menu doesn't respect MaxHeight if enablingScrolling :true
By vladsch in forum Ext 3.x: BugsReplies: 8Last Post: 12 Feb 2010, 9:30 AM


Reply With Quote