Thank you for reporting this bug. We will make it our priority to review this report.
  1. #1
    Sencha User
    Join Date
    Apr 2007
    Posts
    160
    Vote Rating
    0
    vladsch is on a distinguished road

      0  

    Default [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>

  2. #2
    Sencha - Community Support Team Condor's Avatar
    Join Date
    Mar 2007
    Location
    The Netherlands
    Posts
    24,251
    Vote Rating
    73
    Condor is a splendid one to behold Condor is a splendid one to behold Condor is a splendid one to behold Condor is a splendid one to behold Condor is a splendid one to behold Condor is a splendid one to behold Condor is a splendid one to behold Condor is a splendid one to behold

      0  

    Default


    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.

Similar Threads

  1. Replies: 2
    Last Post: 27 Jan 2014, 11:25 PM
  2. Toolbar Oveflow Menu is not properly aligning based on the browser viewport
    By BulletzBill in forum Ext 3.x: Help & Discussion
    Replies: 7
    Last Post: 6 Sep 2010, 1:10 PM
  3. Menu - wrong position when using enableScrolling and maxHeight
    By kamalhg in forum Ext 3.x: Help & Discussion
    Replies: 2
    Last Post: 10 May 2010, 4:08 AM
  4. Replies: 8
    Last Post: 12 Feb 2010, 9:30 AM

Thread Participants: 1

film izle

hd film izle

film sitesi

takipci kazanma sitesi

takipci kazanma sitesi

güzel olan herşey

takipci alma sitesi

komik eğlenceli videolar