[SOLVED] Detect the soft keyboard close-event on IOS

Answered
0
0

Hello,

I got the numeric soft keybord for my textbox at the designer -> ClientEvents -> create focusin event with JavaScript:

this.getChildControl("textfield").getContentElement().setAttribute("inputmode", "numeric");

Works fine and I get the done-Event in code on Android device  by handling the keypress-event at the code-class.

But on IOS clicking the done-button closes the keypad – and nothing happens, no keypress-event!

How can I detect the closing of IOS soft keypad?

The leave-event at code-class comes too late.

 

Kind regards

Ottilie

  • You must to post comments
Best Answer
0
0

Hi Ottillie,

We’re adding a “Mode” property to TextBox.InputType that will wrap the JavaScript for applying an InputMode attribute for future builds!

In regards to the detection of the “done” button, the closest way to do it is to attach to the client event, focusout:

this.textBox1.AddClientEventListener("focusout", "this.fireWidgetEvent('done')");

and then add a handler for TextBox.WidgetEvent.

This will fire more often than when just the done button is pressed, but it should get you on the right track!

 

If you’re using the Wisej Mobile integration package, we can add an event that will give you exactly what you’re looking for: events that fire when the keyboard is shown and disappears, just let me know!

 

BTW, you’re more than welcome to use your TP repository if you need a faster response!

Best regards,

Levie

  • You must to post comments
0
0

Hi Levie,

thanks for the code, it works very well. Firing the event often doesn’t matter in this case, I need only a very small if-statement there.

I integrated Mobile integration package, but until now there is only one textbox that uses the soft keyboard without any button and I added the event handler like you described already.

 

Best regards

 

Ottilie

  • You must to post comments
Showing 2 results
Your Answer

Please first to submit.