Skip to main content
Inspiring
May 10, 2012
Question

iOS SoftKeyboard pan "bounce"

  • May 10, 2012
  • 7 replies
  • 3173 views

I have been working on an AIR app now for the last 6 months and I am really stuck with this one issue I am running into with the softkeyboard on iOS devices. Since most of the TextInputs and TextAreas I use are within scrollers or lists, I could not use StageText and have applied the TextInputSkin and TextAreaSkin to everything to use the old inputs instead. The problem I am running into is that when a user taps on a text field that is below where the keyboard appears (bottom half of the screen on an iPhone), the softkeyboard pans up, then back down, then back up again. This makes it have the appearance of a weird bouncing effect. While this does not effect usability, it is very annoying since it is all over the app.

I applied an event handler to the SoftKeyboardActivate and Deactivate events and sure enough, the activate event is triggered, then deactivated, then activated again. After 10+ hours of searching, I can't seem to find the source of this unnecessary deactivate and activate. I have tried to use softKeyboardBehavior "None" in my app xml but then the text is hidden by the keyboard when the user is typing. This problem does not happen with the new StageText but like I said before, I can't use it because of lack of support with scrolling (and some other weird issues like with fade transitions). The problem exists on both AIR 3.1 and 3.2. To make sure I didn't just have some weird project setting, I created a new project, set the softKeyboardBehavior to "pan", and added a simple text input to the bottom of the auto-generated first view like this:

<s:TextInput skinClass="spark.skins.mobile.TextInputSkin" bottom="15"/>

I then tested it on my iPhone and sure enough, it had the weird bouncing problem. This issue does not occur on Android or BB. To make things even weirder, if I tap the device home button to leave the app, then open it right back up again, the problem goes away. Am I really the only person with this issue? Does anyone know of any way to fix this? Any help would be greatly appreciated. Thanks so much!

This topic has been closed for replies.

7 replies

Inspiring
October 29, 2012

I have not seen this bug nor have I tried using the non-StageText skin, however I am not surprised because I have encountered numerous bugs with the soft keyboard and StageText.

http://forums.adobe.com/message/4729045

http://forums.adobe.com/thread/1090215

https://issues.apache.org/jira/browse/FLEX-33211

Participant
September 24, 2012

Yeah we've found this issue. As far as we've found there is no propper way to counter it.

Suggestion :

Add extra space below the textfield when it receives focus. the issue is caused by the lack of scrollable canvas, so it gives up and then scrolls the view object itself, not just the textfield's parent. Notice the status bar/navigator of your app also goes away when the soft keyboard returns a second time.

or in the declaration of the viewnavigatorapplication, assuming thats your app type, resizeForSoftKeyboard="true"

Hope that helps.

And yeah, very anoying.

Inspiring
October 26, 2012

Filed a bug with adobe about this. They don't seem to care. Looks like they reproduced it, passed it on to the dev team, who immediately deferred it claiming they couldn't reproduce the issue. They asked for votes to even look at it seriously. Vote it up here: https://bugbase.adobe.com/index.cfm?event=bug&id=3345104

Inspiring
May 14, 2012

Still working on resolving this problem with no luck. Seeing as nobody else is having this problem, I think it has to be something to do with my settings or a problem with my SDK. I tried opening a completely new, fresh workspace, new project, still seeing the problem on the most basic app possible. Just tested again with AIR 3.1, 3.2, and 3.3 beta. No luck. I redownloaded the flex 4.6 SDK and overlaid AIR 3.2. The problem still exists. One new development though: Testing on a Galaxy Tab shows that tapping on a text input also activates a keyboard twice, but unlike the iOS devices, it does not deactivate it in the middle of those 2 activations. No clue why. I am now 30+ hours into this with no luck whatsoever. Does anyone have any ideas or suggestions? Please?

Participant
September 20, 2012

Experiencing the same problem at the moment with form. Haven't had any luck in finding a resolution

Did you manage to reach a resolution after you many hours of searching. Any results would be much appreciated

Thanks

Inspiring
May 11, 2012

Really? Does nobody else have this issue? I find that really hard to believe...

Participating Frequently
May 14, 2012

Well, I can't solve your problem and neither have I experienced that exact behavior, but I do want to add another weird case to the mix:

Whenever I used the default input field in my iOS game, the keyboard appeared and pushed the game out of the screen (preventing the keyboard from overlapping the field, so that's correct behavior).

The downside was that the game would not come back down after the field lost focus. So while the keyboard disappeared again, I was left with a gap on the bottom half of the screen. Just black.

This was fixed by changing some of the fields to stage text, but it took me a while to find that as a workaround because I could also not find any information about it. I really don't have a clue why this was happening and it seems to be a rare scenario.

Just a sidenote: I was building this using AIR 3.1 and publishing for iOS and Android so this might be fixed in either 3.2 or 3.3 beta.