Skip navigation
Currently Being Moderated

Flex 4.6 mobile broke TextInput

Nov 30, 2011 6:17 PM

Tags: #mobile #4.6

I'm currently in the process of upgrading a Flex 4.5 mobile project to 4.6 and have run into issues with TextInput's.

 

Currently on most of my views you cannot click(tap) a TextInput and insert text. The field does not seem to take focus and no text appears when you type. I've tried this on a phone as well as on my computer. The weird thing about this is that I have two views where the TextInput's seem to be working. I have also removed all code, MXML and AS3, from a view where input's don't seem to be working and replaced it with a generic TextInput. Even after doing this the text field doesn't seem to be working.

 

I have tried to reproduce this outside of this project but can't seem to be able to. Anyone have any idea what would be causing this?

 
Replies
  • Currently Being Moderated
    Dec 1, 2011 6:22 AM   in reply to frank_aq

    Check if you have any embeded fonts in your application. Also check if your app does have any warnings in the Problems tab (located at the bottom). If it does, provide some details about the warnings. Another thing to take care of is that some full screen application does not allow text input, so check for that too. Any other details about the application would be helpfull too, for example...if you use or not custom skining and/or custom item renderers for wathever a List Component or Group etc.

     
    |
    Mark as:
  • Currently Being Moderated
    Dec 1, 2011 5:42 PM   in reply to frank_aq

    I have the same issue but isolated in a very simple app. I havent tested it in Android, but in iOS it is VERY Buggy...

     

    you just need to have this to reproduce:

     

    <?xml version="1.0" encoding="utf-8"?>

    <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"

                                     xmlns:s="library://ns.adobe.com/flex/spark">

      <fx:Declarations>

      <!-- Place non-visual elements (e.g., services, value objects) here -->

      </fx:Declarations>

      <s:layout>

                        <s:VerticalLayout paddingLeft="15" paddingRight="15" paddingTop="15" paddingBottom="15" />

      </s:layout>

              <s:Scroller width="100%" height="100%"> 

                        <s:VGroup width="100%" height="100%">

     

      <s:TextInput id="ui_firstName" prompt="First Name/>

                                  <s:TextInput id="ui_lastName" prompt="Last Name" /> 

      <s:TextInput id="ui_firstName2" prompt="First Name" />

                                  <s:TextInput id="ui_lastName2" prompt="Last Name" /> 

      <s:TextInput id="ui_firstName3" prompt="First Name" />

                                  <s:TextInput id="ui_lastName3" prompt="Last Name" /> 

      <s:TextInput id="ui_firstName4" prompt="First Name" />

                                  <s:TextInput id="ui_lastName4" prompt="Last Name" /> 

      <s:TextInput id="ui_firstName5" prompt="First Name" />

                                  <s:TextInput id="ui_lastName5" prompt="Last Name" /> 

      <s:TextInput id="ui_firstName6" prompt="First Name" />

                                  <s:TextInput id="ui_lastName6" prompt="Last Name" /> 

      <s:TextInput id="ui_firstName7" prompt="First Name" />

      <s:TextInput id="ui_lastName7" prompt="Last Name" />

      <s:TextInput id="ui_firstName8" prompt="First Name" />

      <s:TextInput id="ui_lastName8" prompt="Last Name" />

      <s:TextInput id="ui_firstName9" prompt="First Name" />

                                  <s:TextInput id="ui_lastName9" prompt="Last Name" /> 

                                  <s:Rect height="500" />

      </s:VGroup> 

      </s:Scroller>

    </s:Application>

     
    |
    Mark as:
  • Currently Being Moderated
    Dec 1, 2011 6:25 PM   in reply to frank_aq

    See other discussions about 4.6 and TextInput or TextArea.  4.6 introduces StageText which gives you native text input with some restrictions like no support for scrolling.  You can give up native text input and back to TextField input via skinClass=”spark.skins.mobile.TextInputSkin” or TextAreaSkin.

     
    |
    Mark as:
  • Currently Being Moderated
    Dec 1, 2011 6:34 PM   in reply to Flex harUI

    Wow, that sounds promissing!... where can I find info about it?  I've already downloaded the latest SDK but I cant find the class StageText.  Are you telling me that a workaround for the StageText limitation is to switch with a normal TextField while it is not editing? Have you tested that already?

    Thanx

    -roberto

     
    |
    Mark as:
  • Currently Being Moderated
    Dec 1, 2011 6:53 PM   in reply to AS2Xtreme

    You have to choose between native textInput or textfield input.  I suppose you could try switching skins when not focused, but I don’t know how well that will work.  Usually, you have to choose up front.

     
    |
    Mark as:
  • Currently Being Moderated
    Dec 1, 2011 6:58 PM   in reply to Flex harUI

    Well the whole future of my project relies on it.  It is irritating that a simple textinput in the bottom part of a form gets overlayed by the softkeyboard and you cant see what you are typing.  I nested the form in a Scroller container, but it just write the text elsewhere.  Do you know any good advice when building forms with flex for mobile? is there a special functionality to make the textinput work with/without scroller?

    -roberto

     
    |
    Mark as:
  • Currently Being Moderated
    Dec 1, 2011 9:42 PM   in reply to AS2Xtreme

    I've just realized that is a StageText in Flex 4.6 is enabled by default, once I compiled with 4.5.1 I stop seeing the problem.  What I need to find out now is how I disable StageText in Flex 4.6, or even better, try to remove the scroller and just leave a blank space below. It sounds like its going to work.

    -roberto

     
    |
    Mark as:
  • Currently Being Moderated
    Dec 1, 2011 11:24 PM   in reply to AS2Xtreme

    By using spark.skins.mobile.TextInputSkin, you will not use StageText and use TextField instead.  Then scrolling will work, but you won’t get native input features.

     
    |
    Mark as:
  • Currently Being Moderated
    Dec 1, 2011 11:44 PM   in reply to Flex harUI

    Well, as far as I've tested, the only native feature that I dont have is grammar checking, I can edit, copy, paste and even receive suggestions when I use the old ones. :S  so I dont really see tha advantage of using StageText at least for this proyect. :S

     
    |
    Mark as:
  • Currently Being Moderated
    May 22, 2012 11:59 AM   in reply to Flex harUI

    Using:

     

    s|TextInput
    {
    skinClass
    : ClassReference("spark.skins.mobile.TextInputSkin");
    }

     

    Makes TextInput not editable, in emulator and on actual device, at least on my environment: Flex 4.6 + AIR 3.1.

     
    |
    Mark as:
  • Currently Being Moderated
    Nov 9, 2013 4:55 PM   in reply to AS2Xtreme

    Have you tried using it in iPad with iOS7 and Air 3.8 (or 3.9), the non-native text input is not usable, it seems to overwrite whatever you type. We had to build a workaround that uses Stage Text. See here  : http://blog.flexicious.com/post/Scrolling-Issues-With-TextInput-for-Fl ex-Air-Mobile-Native-StageText.aspx

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points