6 Replies Latest reply on Jun 15, 2012 11:21 AM by jetrased

    TitleWindow PopUp Tab/Focus problem

    jetrased

      Hi

       

      I am wondering if anyone can help me. There is a titleWindow popup created. A login form is loaded into it. With 2 text input fields: Username and Password and one Button, OK.

       

      The problem I am having is that I cannot get tabbing to work inside the new titleWindow. When I click on the user input field and then press tab, the cursor disappears. I have searched the net and there are numerous instances of this happening, but no actual solution that I can see.

       

      The Login Component is of type VBox.

       

      The weird thing is, if I enter the wrong details or no details and click ok. Then The tabbing wors the second time around. It is just when it is initially loaded. I have no idea why this could be?

       

      Can anyone help as it is driving nuts.

       

      Thanks

        • 1. Re: TitleWindow PopUp Tab/Focus problem
          Flex harUI Adobe Employee

          So there is a SWFLoader in the TitleWindow?  Maybe show the MXML for the TitleWindow?

          • 2. Re: TitleWindow PopUp Tab/Focus problem
            jetrased Level 1

            Here is the MXML for the title windoew to be popped up

             

            private function popupLogOnDlg(evt:Event=null):void

                                          {

                                                    stwLogOn = new StwLogOn();

                                                    stwLogOn.addEventListener("clickOK", handleCloseLogOnDlg);

                                                    titleWindow= TitleWindow.show(stwLogOn, "Log On", 0, true, null, handleCloseLogOnDlg);

                                                    titleWindow.isResizable=false;

             

                                          }

             

             

            And here is the MXML for the Login Component

             

             

            <mx:VBox xmlns:mx="http://www.adobe.com/2006/mxml"

                                  width="280" height="115" defaultButton = "{okBtn}">

                      <mx:Script>

                                <![CDATA[

                                          private function handleClickOK():void

                                          {

                                                    dispatchEvent(new Event("clickOK"))

                                          }

                                ]]>

                      </mx:Script>

                      <mx:Form width="100%">

                                <mx:FormItem width="100%" label="User name:" horizontalAlign="right">

                                    <mx:TextInput width="100%" restrict="A-Za-z0-9_." id="nameTextInput"/>

                                </mx:FormItem>

                                <mx:FormItem width="100%" label="Password:" horizontalAlign="right">

                                    <mx:TextInput width="100%" id="keywordTextInput" displayAsPassword="true"/>

                                </mx:FormItem>

                      </mx:Form>

                      <mx:HBox horizontalAlign="right" width="100%">

                                <mx:Button label="Log On" id="okBtn" click="handleClickOK()"/>

                                <mx:Spacer width="10"/>

                      </mx:HBox>

             

            </mx:VBox>

            • 3. Re: TitleWindow PopUp Tab/Focus problem
              Flex harUI Adobe Employee

              The Flex SDK TitleWindow doesn’t have a show method.  Maybe your TitleWindow is not the one from the Flex SDK and doesn’t implement IFocusManagerContainer.

              • 5. Re: TitleWindow PopUp Tab/Focus problem
                StephaniesHusband Level 1

                How did you resolve this?  I have the exact same issue and cannot find ANY way to fix it.  I've tried everything I know to do and everything from the Adobe site cited.

                • 6. Re: TitleWindow PopUp Tab/Focus problem
                  jetrased Level 1

                  Hi

                   

                  I added applicationComplete method and tin here is where I called my login to pop up. Worked for me.

                  protected function applicationComplete():void

                  {

                            addEventListener(FlexEvent.SHOW,popupLogOnDlg);

                  }

                   

                  The here is the method I call.

                   

                                                private function popupLogOnDlg(evt:Event=null):void

                                                {

                   

                                                          stwLogOn = new StwLogOn();

                                                          stwLogOn = StwLogOn(PopUpManager.createPopUp(this, StwLogOn, true));

                                                          stwLogOn.addEventListener("clickOK", handleCloseLogOnDlg);

                                                          PopUpManager.centerPopUp(stwLogOn);

                   

                                                }