Copy link to clipboard
Copied
I've already filed a bug (3610876) about this but I'm looking for a workaround as I haven't found any.
Basically StageText seems to not listen to SoftKeyboardEvent.ACTIVATE and SoftKeyboardEvent.DEACTIVATE. It is, however, listening to SoftKeyboardEvent.ACTIVATING.
Here's a sample code that reproduces the problem.
package
{
import flash.display.Sprite;
import flash.events.SoftKeyboardEvent;
import flash.geom.Rectangle;
import flash.text.StageText;
[SWF(width='1024',height='768',backgroundColor='#ffffff',frameRate='25')]
public class SimpleStageText extends Sprite
{
private var myText:StageText;
public function SimpleStageText()
{
super();
myText = new StageText();
start();
}
protected function start():void
{
myText.stage = this.stage;
myText.viewPort = new Rectangle(5,300,100,20);
myText.addEventListener(SoftKeyboardEvent.SOFT_KEYBOARD_ACTIVATING,onKeyboardActivating);
myText.addEventListener(SoftKeyboardEvent.SOFT_KEYBOARD_ACTIVATE,onKeyboardActivate);
myText.addEventListener(SoftKeyboardEvent.SOFT_KEYBOARD_DEACTIVATE, onKeyboardDeactivate);
}
protected function onKeyboardActivating(event:SoftKeyboardEvent):void
{
trace("SoftKeyboardActivating");
}
protected function onKeyboardActivate(event:SoftKeyboardEvent):void
{
trace("SoftKeyboardActivated");
}
protected function onKeyboardDeactivate(event:SoftKeyboardEvent):void
{
trace("SoftKeyboardDeactivated");
}
}
}
Any ideas how to get those handlers to function properly?
Also an additional issue is when the softkeyboard comes up the screen is not panning even though I've set "softKeyboardBehavior" to pan in the -app.xml file.
Copy link to clipboard
Copied
Could you please share the AIR SDK version and device with OS version you are using? I tried with the latest build available at http://www.adobe.com/devnet/air/air-sdk-download.html with the sample code provided above and it's working fine.
Regards,
Nimit
Copy link to clipboard
Copied
I'm using AIR 3.7.0 build 1860. I'm currently testing on an iPad mini running iOS 6.0.2. I'm updating to 6.1.3 right now to see if anything changes. I'll also give a shot at AIR 3.8, but I have to test everything else in my projects before sticking with it...
Message was edited by: exprpub I've updated the iPad Mini to the latest iOS 6.1.3 and AIR SDK to 3.8 (build 870). Unfortunately the problem persists. Only the handler for SoftKeyboardEvent.SOFT_KEYBOARD_ACTIVATING is called. The other two handlers are not called at all.
Copy link to clipboard
Copied
I think I'm getting somewhere now. I actually debugged the project on an iPhone 4S, an iPad (3) Retina and an iPad Mini, and the problem only appears on iPad Mini!! So I'm guessing that's where the problem is inside the SDK.
Copy link to clipboard
Copied
Yes, on iPad Mini, only SoftKeyboardActivating event is coming. We need to investigate on this. Could you please open a new bug report on this over at bugbase.adobe.com? Once the bug has been added would you mind posting back with the URL so that others affected can add their votes and comments?
Regards,
Nimit
Copy link to clipboard
Copied
Here's the link for the reported bug...