iOS Question [B4XPage] Hide keyboard not working in Disappear event

Alexander Stolte

Expert
Licensed User
Longtime User
Upvote 0

Semen Matusovskiy

Well-Known Member
Licensed User
According my investigations (IOS 15.1), you need to have B4XPage_KeyboardStateChanged subroutine.
Actually a behaviour is not stable in my experiments. Maybe a delay is needed.
Can you post a sample which you test ?
About Disappear I am not sure. It works (and sometimes does not work) with and without this event.
 
Last edited:
Upvote 0

Semen Matusovskiy

Well-Known Member
Licensed User
I tested. But I don't see problems on my iPhone 6s Plus (IOS 15.1).
What I do ... I click Next Page and type text on second page. Then I press Home button (when keyboard is visible). On Home screen I press app icon and iPhone shows the second page without keyboard.

Try to replace to
B4X:
Private Sub B4XPage_Disappear
    Root.As(NativeObject).RunMethod("endEditing:", Array(True))
    Do While isKeyboardOpen
        Sleep (10)
    Loop
End Sub
 
Upvote 0
Top