Force the Keyboard to be displayed

I have an app with some chat in it. It’s a basic page with 3 components: an input for the message, a send button and a panel to display messages.

If the user is typing in the input, no problem: the keyboard is out. When he clicks the send button however (I disabled submitting directly from the keyboard to allow for line breaks), when he clicks the button, the input loses focus and the Keyboard disappears.

A workaround is to give the focus back immediately after the click, but even then, there is a flicker where the Keyboard disappears / appears again. I guess a control to force the Keyboard to be displayed would help a lot here.

Hi,

I don’t think this can be effectively enforced reliably in a cross-platform way with a simple property. Android in particular is very “special” about how it deals with hides the keyboard, and how to work around the default behavior varies a lot with different scenarios.

You can however try disabling focusability for the button <Button IsFocusable="false" />. Does that help?

Hi Anders!

I tried what you suggested and it didn’t change much. The second I click the button (or anywhere else), the input loses focus and the keyboard folds.

Actually iOS seems to be worst than Android, because in Android, a click on the button can give back focus to the input immediately, whereas in iOS I have to click twice: once and I lose focus on the input and the keyboard folds and the send click is not even registered, and a second time on the send button, which then gives back focus to the input :confused: