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

[customer] Focus move into Parent win when modal win is controled by enabled

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Not A Problem
    • Adobe Flex SDK 2.0.1 (Release)
    • PopUp Manager
    • None
    • Affected OS(s): All OS Platforms
      Affected OS(s): All OS Platforms
      Language Found: English

    Description

      For a workaround bug #193102, to show modal win from modal win,
      use showing modaless win from modal win which is set enable false.
      That means when showing modaless win from modale win, set enable false,
      and when closing modaless win, set enable true.
      However, when moving focus with TAB key, focus moves into Parent win, not modal win

      Reproduction:
      1. Run test.mxml
      2. Click PopUp button, then appears PopUp win
      3. Click OK to close Alert win
      4. Click TAB key, focus is Button, PopUp on Parent win
      5. Click TAB key, focus is TextInput on Parent win

      Actual Results:

      Expected Results:

      Workaround:

      Test Case:
      test.mxml
      =======
      <?xml version="1.0" encoding="utf-8"?>
      <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="vertical">

      <mx:Script>
      <![CDATA[
      import mx.events.ResizeEvent;
      import mx.containers.TitleWindow;
      import mx.managers.PopUpManager;

      private function clickHandler(event:MouseEvent):void

      { var window:sample5TitleWindow = sample5TitleWindow( PopUpManager.createPopUp(this, sample5TitleWindow, true)); PopUpManager.centerPopUp(TitleWindow(window)); }

      ]]
      >
      </mx:Script>

      <mx:Button label="PopUp" click="clickHandler(event);" horizontalCenter="-208" verticalCenter="-238"/>
      <mx:TextInput/>
      </mx:Application>

      sample5TitleWindow.mxml
      ===================
      <?xml version="1.0" encoding="utf-8"?>
      <mx:TitleWindow xmlns:mx="http://www.adobe.com/2006/mxml" layout="vertical" width="400" height="300"
      creationComplete="creationCompleteHandler(event);">

      <mx:Script>
      <![CDATA[
      import mx.managers.SystemManager;
      import mx.controls.Alert;
      import mx.events.FlexEvent;
      import mx.managers.PopUpManager;

      public var parentS:Sprite;

      private function creationCompleteHandler(event:FlexEvent):void {
      // Alert is modoless
      var obj:Alert = Alert.show("Message","",4|Alert.NONMODAL,this,closeAlert,null);
      //
      //var obj:Alert = Alert.show("Message","Title",4,this);
      this.enabled = false;
      BT01.enabled = false;
      //lb01.enabled = false;
      }

      private function closeAlert(event:Event):void {
      this.enabled = true;
      this.setFocus();
      }
      ]]
      >
      </mx:Script>

      <mx:Button label="Close" click="PopUpManager.removePopUp(this);"/>

      <mx:HBox width="100%" height="100%">
      <mx:Text width="50%" color="blue" text="test"/>
      </mx:HBox>
      <mx:Button label="Add to Cart"/>
      <mx:ControlBar>
      <mx:Label id="lb01" text="Quantity"/>
      <mx:NumericStepper/>
      <mx:Spacer width="100%"/>
      <mx:Button id="BT00" label="Add to Cart1"/>
      <mx:Button id="BT01" label="Close1" click="PopUpManager.removePopUp(this);"/>
      </mx:ControlBar>
      </mx:TitleWindow>

      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: