You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@flex.apache.org by aaronyeo22 <aa...@gmail.com> on 2016/12/12 15:15:54 UTC
Android soft keyboard and back button.
1. here clicks a textinput so it focuses and soft keyboard appears
2. user click back key on his phone - soft keyboard retracts (no
backkeypressed event caught)
3. textinput still has the focus border around it (why?) and user clicks
back key again - application goes in the background for a couple of seconds
and closes itself.
protected function textinput1_keyDownHandler(event:KeyboardEvent):void
{
trace(event.keyCode);
if (event.keyCode == Keyboard.BACK) {
trace("back!!");
event.stopImmediatePropagation();
event.preventDefault();
}
}
<s:TextInput keyDown="textinput1_keyDownHandler(event)" />
--
View this message in context: http://apache-flex-users.2333346.n4.nabble.com/Android-soft-keyboard-and-back-button-tp14321.html
Sent from the Apache Flex Users mailing list archive at Nabble.com.
Re: Android soft keyboard and back button.
Posted by vincent <qu...@pchi.com.tw>.
aaronyeo22 wrote
> 1. here clicks a textinput so it focuses and soft keyboard appears
> 2. user click back key on his phone - soft keyboard retracts (no
> backkeypressed event caught)
> 3. textinput still has the focus border around it (why?) and user clicks
> back key again - application goes in the background for a couple of
> seconds and closes itself.
>
>
> protected function textinput1_keyDownHandler(event:KeyboardEvent):void
> {
> trace(event.keyCode);
> if (event.keyCode == Keyboard.BACK) {
> trace("back!!");
> event.stopImmediatePropagation();
> event.preventDefault();
> }
> }
> <s:TextInput keyDown="textinput1_keyDownHandler(event)" />
Have the same issue here. I clear the TextInput focus by setting stage.focus
to null when the softkeyboard deactivated as a workaround.
--
View this message in context: http://apache-flex-users.2333346.n4.nabble.com/Android-soft-keyboard-and-back-button-tp14321p14575.html
Sent from the Apache Flex Users mailing list archive at Nabble.com.