How to focus on the first box and lift the keyboard of the photo in a web application when loading with javascrip?

Hi Jose,

Use "autoFocus" property on box and set as true like below image-

Follow this URL-

https://www.outsystems.com/forums/discussion/22158/input-setfocus-for-mobile-app/


Regards

Rahul Sahu

Rahul Sahu escribió:

Hola Jose,

Utilice la propiedad "autoenfoque" en el cuadro y configúrelo como verdadero como se muestra a continuación.

Sigue esta URL

https://www.outsystems.com/forums/discussion/22158/input-setfocus-for-mobile-app/


Saludos

Rahul Sahu

Me enfoco con éxito, pero no levanto el teclado


Other way to do this... you don't need to add a class, just change the JavaScript code to this:

"$(""#" + inpPartRef.Id + """).focus()"

But using the RichWidget Input_SetFocus also works.

other way... in the Submit action, add a RunJavaScript action (From HTTPRequestHandler), with a simple jQuery like this:


Cheers,
Miguel

Hi Jose,

can you provide your code because i am using it and working to.

@Miguel , Rich Widget is not workiing in mobile and also jquery is harmful to app.


Regards

Rahul 

Rahul Sahu wrote:

Hi Jose,

can you provide your code because i am using it and working to.

@Miguel , Rich Widget is not workiing in mobile and also jquery is harmful to app.


Regards

Rahul 

use focus in both ways and still don't lift keyboard


Has anyone found a solution to show the keyboard in focus? =(

autofocus has different behavious on different browsers and platforms. 

So you can use it only for a reliable option to do focus on your input but to open the keyboard I don't think there is any universal solution which applies everywhere. Keyboard in mobile s after all a device feature which I don't think you will be able to control in a web app. For mobile app case is different, there are some plugins available for that.

jose muñoz wrote:

How to focus on the first box and lift the keyboard of the photo in a web application when loading with javascrip?

Hi Jose,


Please check the attached demo working example.Let me know if you find any issue to integrate it in your code.