Uploaded image for project: 'Apache Flex'
  1. Apache Flex
  2. FLEX-32351

sub-menu of MenuBar don't measure height very well for the first time

VotersWatch issueWatchersLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Later
    • Adobe Flex SDK Previous
    • None
    • ADG:Display
    • None
    • Affected OS(s): Windows
      Affected OS(s): Windows XP
      Language Found: English

    Description

      Steps to reproduce:
      1.
      //method 1
      private function onMenuBarInitialize():void {
      var menu:Menu;
      for (var i:int = 0; i < menuBar.menus.length; i++)

      { menu = menuBar.menus[i]; menu.variableRowHeight = true; }

      }

      //method 2
      private function onMenuShow(event:MenuEvent):void {
      var t:MenuBar = event.currentTarget as MenuBar;
      event.menu.variableRowHeight = true;
      }

      2.
      <mx:MenuBar id="menuBar" width="100%" labelField="@label"
      initialize="onMenuBarInitialize" iconField="@icon" styleName="menuBar"
      itemClick="onMenuBar(event)" menuShow="//onMenuShow(event)">

      <mx:XMLList>
      <menuitem label="File">
      <menuitem label="New" icon="documentIcon" />
      <menuitem label="Open..." icon="documentIcon"/>
      <menuitem type="separator" />
      <menuitem label="Close" />
      <menuitem type="separator" />
      <menuitem label="Save" />
      <menuitem label="Save as..." />
      <menuitem type="separator" />
      <menuitem label="Import..." />
      <menuitem label="Export..." />
      <menuitem type="separator" />
      <menuitem label="Exit" />
      </menuitem>
      <menuitem label="Edit">
      <menuitem label="Cut" />
      <menuitem label="Copy" />
      <menuitem label="Paste" />
      <menuitem type="separator" />
      <menuitem label="Select All" />
      <menuitem type="separator" />
      <menuitem label="Find" />
      </menuitem>
      </mx:XMLList>
      </mx:MenuBar>

      Actual Results:

      The FIRST time I click the MenuBar, the sub-menu show as below:

      -----------

      New

      -----------

      Open

      -----------

      Close

      -----------

      Save
      Saveas..

      -----------

      Import...
      Export...

      -----------

      Exit
       
       
       
       

      -----------

      The SECOND time I click the MenuBar, the sub-menu show as below:

      -----------

      New

      -----------

      Open

      -----------

      Close

      -----------

      Save
      Saveas..

      -----------

      Import...
      Export...

      -----------

      Exit

      -----------

      Expected Results:

      Workaround (if any):

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            adobejira Adobe JIRA
            adobejira Adobe JIRA
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment