6 Replies Latest reply on Jul 2, 2015 2:36 AM by geekmisan

    Flex mobile resizeForSoftKeyboard leaving white space

    frank_aq Level 1

      I'm currently using the new TextInputs to display on screen keyboards with resizeForSoftKeyboard set to true. The problem I'm having is when I set stage.focus = null the keyboard disappears but the a white block is left in it's place. It looks like the app is not resizing it's self back to the non-keyboard position. I've been able to reproduce this across my mobile app.

       

      Anyone else experiencing this?

        • 1. Re: Flex mobile resizeForSoftKeyboard leaving white space
          frank_aq Level 1

          Strangely I've been able to reproduce this bug in a fresh project as well. Is there some other method I should be calling to close the soft keyboard?

          • 2. Re: Flex mobile resizeForSoftKeyboard leaving white space
            jln646v

            I am having the same problem.  After a ton of searching though, I have not been able to find a solution.  I would be very interested if anyone has any information about this.

            • 3. Re: Flex mobile resizeForSoftKeyboard leaving white space
              PiRREST

              I'm experiencing the same thing

              resizeForSoftKeyboard is set to false in my project and in app descriptor i have:

              <softKeyboardBehavior>pan</softKeyboardBehavior>

               

              And once stage is moved to top, to show text input at the bottom of the screen when keyboard is shown - it never goes back. Tried many things, tried AIR SDK 3.1, 3.2, 3.3_beta - the same results.

               

              Does anyone knows a workaround?

              • 4. Re: Flex mobile resizeForSoftKeyboard leaving white space
                Tim John

                I'm also having the same problem with Flex 4.6.

                 

                I've put a listener on the softKeyboardActivate and softKeyboardDeactivate events. The activate event always triggers, and the deactivate event triggers when the component loses focus to something that doesn't need the soft keyboard - unless a change of view is triggered. When I say change of view, it could be either a view push/pop or a change of state. So my theories on the cause include:

                 

                1. perhaps the item that should be dispatching the deactivate event no longer exists on the display list
                2. the event isn't bubbling up properly due to a display list change
                3. high CPU activity is causing handling of the even to be skipped

                 

                I've tried setting focus to an item on the top level application, to eliminate the possibility of 1. That disn't make a difference. So that still leaves option 2 and 3. Can't say for sure. It's a pain in the neck, that is certain.

                 

                I'm going to try one more thing and post back. There are many threads regarding this error all over the web, but none has presented a solution yet.

                • 5. Re: Flex mobile resizeForSoftKeyboard leaving white space
                  Lite Solultions

                  I have seen that the softKeyboardDeactivate event from TextInput is not fired, as other actions that the unpan should cause are neither fired.

                   

                  I've found a workaround, it's a little tricky but it works.

                   

                  Put a new TextInput hidden on top of the View, then on focusOut event on the original TextInput, force focus on the hidden TextInput. Softkeyboard event will be activated for that TextInput and the pan will return to the top of the View, then take off the focus from the new TextInput and the softkeyboard will disappear.

                   

                  The user will not notice about this tricky solution.

                   

                      <s:TextInput id="ghost" x="-100" y="0" width="0" height="0"/>

                      <!-- ... -->

                      <s:TextInput id="original" focusOut="textInputFocusOutHandler(event)"/>

                   

                  ...

                   

                      public function textInputFocusOutHandler(event:FocusEvent):void

                      {

                                this.ghost.setFocus();

                                callLater(this.setFocus);

                      }

                  • 6. Re: Flex mobile resizeForSoftKeyboard leaving white space
                    geekmisan

                    It's really frustrating. I'm using Flex 4.14 and this bug has not been solved now.