Flex的4.6隐藏/驳回softkeyboardFlex、softkeyboard

2023-09-08 13:22:47 作者:没死就别把自己当废物

我有在弯曲4.6,并与softkeyboard行为的一些问题,空气中3.1

I'm having some issues with the softkeyboard behaviour in flex 4.6 and air 3.1

我有一个在顶部的搜索栏的列表。当用户选择TextInput组件中的softkeyboard弹出像它应该。 现在,当用户完成输入自己的文字和presses回报(或做/搜索/ ...)键我想softkeyboard消失。

I have a list with a search bar on top. When a user selects the TextInput component the softkeyboard pops up like it should. Now when the user is done typing his text and presses the return (or the done/search/...) key I want the softkeyboard to disappear.

我试过到目前为止:

我已经设置了returnKeyLabel属性设置为完成的按钮显示 相应地上升。然而,只有驳回在Android键盘,上 IOS键盘只是熬夜。

I've set the returnKeyLabel property to "done" and the button shows up accordingly. However it only dismisses the keyboard on Android, on IOS the keyboard just stays up.

然后我通过不设置returnKeyLabel并手动尝试 醒目的返回键和对焦设定到另一个元素 不需要softkeyboard但也不能工作。

I then tried by not setting the returnKeyLabel and manually catching the Return key and setting the focus to another element that does not require a softkeyboard but that didn't work either.

我也试图通过派遣自己的伪造单击事件时,返回键是pressed但是这也没有工作。

I also tried by dispatching my own "faked" click events when the Return key was pressed but this also didn't work.

由于搜索关于这个问题的一部分,我发现这个辞退SoftKeyboard在Flex移动但没有任何工作。或者至少在弯曲4.6

As part of searching about this problem I found this Dismiss SoftKeyboard in Flex Mobile but that didn't work either. Or at least not in flex 4.6

现在没有人知道隐藏softkeyboard或使returnKeyLabel一个很好的方式做工作内部监督办公室,将与柔性4.6 / 3.1的空气?

Now does anyone know of a good way to hide the softkeyboard or make the returnKeyLabel "done" work on IOS that will work with flex 4.6/air 3.1?

推荐答案

您是否尝试过这样的事情?

Have you tried something like this?

<s:TextInput prompt="First Name" returnKeyLabel="done" enter="handlerFunction()"/>  
private function handlerFunction():void{
    stage.focus = null
}