324
Views
8
Comments
Focus And Javascript
Question

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


WhatsAppImage20200418at04.57.41.jpeg
2026-02-26 06-29-24
Rahul
 
MVP

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

UserImage.jpg
José Luis Muñoz

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


2025-11-19 06-14-01
Miguel Verdasca
Champion

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

2026-02-26 06-29-24
Rahul
 
MVP

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 

UserImage.jpg
José Luis Muñoz

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


UserImage.jpg
José Luis Muñoz

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

2020-03-01 17-52-33
Nikhil Gaur

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.

2021-09-10 14-03-53
Salman Ansari

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.


FocusOnNext.oml
Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.