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

Alert window isn't centered when Alert.show is called while a popwindow is on the stage

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • Adobe Flex SDK Previous
    • None
    • mx: Alert
    • None
    • Affected OS(s): All OS Platforms
      Language Found: English

    Description

      Steps to reproduce:
      1. Create an app with a PopUpMenuButton component that calls an event handler function upon itemClick.
      2. Call Alert.show() in the event handler function (see attached demo app).
      3. At runtime, select item from PopUpMenuButton's drop-down list.

      Actual Results:
      The Alert window appears in the application upper left corner.

      Expected Results:
      The Alert window should be centered on the screen.

      Workaround (if any):
      (a) Explicitly position the Alert with:
      private function itemClickHandler(event:MenuEvent):void

      { var theAlert:Alert = Alert.show("Menu label: " + event.item.@label, "Menu value: " + event.item.@value); theAlert.x = (width/2) - (theAlert.width/2); theAlert.y = (height/2) - (theAlert.height/2); }

      (b) instead of explicitly setting the x/y and doing "math", use the PopUpManager class's centerPopUp() method:
      var alrt:Alert = Alert.show("any old label");
      PopUpManager.centerPopUp(alrt);

      (c) display the Alert using callLater().

      Appears to be a regression from between 3.1 and 3.2.

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: