• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
Locked
0

Soft Keyboard not working in iOS 7 / AIR 3.9

Explorer ,
Sep 18, 2013 Sep 18, 2013

Copy link to clipboard

Copied

Hi,

I've been transitioning my app to the latest AIR 3.9 beta for iOS 7, and I'm running into a wild issue. None of the text fields trigger the virtual keyboard anymore. The cursor is blinking, and if I select different textfields, the cursor moves there. But the soft keyboard doesn't appear. Come to think of it, it's possible I already had this behavior in 3.8, which I didn't stay in for long for debugging reasons, so I never released in 3.8.

Here is the condensed code as it relates. First the text field is created and then it's activated. But even with multiple text fields on the screen, tapping between them doesn't trigger the keyboard.

// Creation

label.enabled = true;
label.autoCapitalize = AutoCapitalize.SENTENCE;
label.softKeyboardType = SoftKeyboardType.DEFAULT;

// Activation

label.setFocus();
label.needsSoftKeyboard = true;
label.requestSoftKeyboard();

Is there something I'm doing wrong that I'm missing that's maybe suddenly incompatible?

Thanks,

Per

TOPICS
Development

Views

3.3K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Adobe Employee , Sep 19, 2013 Sep 19, 2013

This is really unfortunate you are seeing this. I have tried a sample application using softkeyboard and stageText but could not able to reproduce the problem. I have attached the sample app https://www.dropbox.com/s/imyc6d21ofx12nj/Softkeyboard.zip for your reference, could you please try it once and update if I have missed anything.

Device used: iPhone 5(v7.0)

Regards,

Nimit

Votes

Translate

Translate
Adobe Employee ,
Sep 19, 2013 Sep 19, 2013

Copy link to clipboard

Copied

This is really unfortunate you are seeing this. I have tried a sample application using softkeyboard and stageText but could not able to reproduce the problem. I have attached the sample app https://www.dropbox.com/s/imyc6d21ofx12nj/Softkeyboard.zip for your reference, could you please try it once and update if I have missed anything.

Device used: iPhone 5(v7.0)

Regards,

Nimit

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Sep 19, 2013 Sep 19, 2013

Copy link to clipboard

Copied

Success!

I have been using TextFields and TextAreas in the app, and since 3.8/3.9, they don't invoke the keyboard anymore. I've now implemented your example directly into the app, and I can confirm that using StageText directly works. Presumably, I have been using a feature that has been deprecated. Is it intended that TextFields and TextAreas should no longer invoke the keyboard? I need to do some re-coding to move to StageText, but the bottom line is that I have a solution.

I want to personally thank you for you excellent response, I'm delighted to see this commitment from Adobe.

Cheers,

Per

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
Sep 19, 2013 Sep 19, 2013

Copy link to clipboard

Copied

Great.

-Nimit

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Sep 20, 2013 Sep 20, 2013

Copy link to clipboard

Copied

Wait is it confirmed that simple textboxes no longer evoke the softKeyboard in 3.9?? Seems to still work on Android.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
Sep 20, 2013 Sep 20, 2013

Copy link to clipboard

Copied

Hi,

Could you please provide a sample application with textFields and TextArea to reproduce the problem. When I tried with textField and TextArea its working very fine for me. Possibly there is some problem with in the code.

Regards,

Nimit

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Sep 20, 2013 Sep 20, 2013

Copy link to clipboard

Copied

Hi,

There's no question that TextFields and TextAreas weren't working in our case, likely because we have a deep displaylist with a variety of object types. Presumably, AIR has changed how it looks through the displaylist for objects that need keyboard, and perhaps we have an object type somewhere in the hierarchy that AIR no longer recurses. It's definitely something that changed, though.

It's no picnic to put together a sample app, I can't afford that time when I have a solution. But the symptom was very clear, a textbox would open, and the cursor would just blink with no way of interacting with it.

I'm happy using StageText directly, because it's a more direct way to interact with the OS and gives more control.

It also solves a bug in AIR that I haven't reported yet, but is as follows. Rarely, when you move the container of a TextField of TextArea after it has been created, AIR will crash and freeze iOS devices. It doesn't happen on Android or desktop, but with a user-base of about 100,000 of our app, we've had it reported maybe 50 times. One of our dialogs sometimes needs to reposition the elements, which is done animated. During this, AIR will crash about 0.01% of the time. We tried only creating the TextArea, but not activating it or even having it visible, but even an invisible TextArea will crash, presumably because AIR moves the internal StageText overlay around as well, and this confuses iOS after a while during the animation.

By using StageText directly, I finally also have a way to get rid of this bug, because I simply don't activate StageText until the object has already been positioned. Prior to that, it isn't even an editable text field, it's a label like anything else. So I'm happy I did this solution.

Let's just leave this thread as a record if someone else has the same problem. I'm quite sure it's because of our very complicated display list, and AIR having changed how it scans the displaylist for objects that need keyboard.

Best,

Per

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Sep 20, 2013 Sep 20, 2013

Copy link to clipboard

Copied

so would it be safe to say... AIR apps that are heavy on the display list and contain all types of textfields, be it drop downs, datagrids... should not update to air 3.9? I have an app that is very large and is currently running AIR 3.8 and works pretty great on iOS. Now i'm scared... more so because I'm waiting on AIR releases to fix other bugs

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Sep 20, 2013 Sep 20, 2013

Copy link to clipboard

Copied

Hi,

I also had this problem in AIR 3.8, but I was only in 3.8 for a couple of hours, then I realized that the 3.9 beta was out and upgraded in case there was anything regarding iOS 7.

Our app has gone through a number of iterations, and we have sort of a messy layering of different types of objects, some Flex, some Spark stuff, and I think that some of these are not really supposed to be parented to each other. But it works, and we're not touching it until we migrate the whole app to Starling, in which case everything will become Starling Sprites with stuff inside them.

So I hope that helps. Couldn't you simply back up your compiler folder and your SDK folder, do the 3.9 upgrade and find out? My hunch is that you'll be fine if it works in 3.8.

Best,

Per

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Jan 21, 2016 Jan 21, 2016

Copy link to clipboard

Copied

LATEST

I am having this problem on SOME Android devices, using AIR 19. iOS is perfectly ok.

If I exit the app and enter it again (after an ACTIVATE event) it works as expected.  However, on first starting the app selecting any text field will not invoke the soft keyboard.

Highly frustrating.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines