28
Views
10
Comments
focus gets out when selecting dropdown values in from current to first element
Question
Application Type
Reactive

hello, i am using a webblock and in that webblock i have a form, and handling the event of this form in module (in my application). but here for normal inputs my focus is getting to next element but while selecting dropdown my focus is again getting to window first element.


i tried javascript also but it is not working . also used focus method of outsystem this is also not working .

Can some one help me out .

Thanks 

2023-06-13 12-29-43
Sakthivel P

Hi @Bharat koshti,

In Dropdown On Change you can manually set the focus to the next element by using java script.

Pass next WidgetId in the input parameter.

2023-02-28 05-45-34
Bharat koshti

already did this not working.

2024-10-12 12-11-20
Kerollos Adel
Champion

Hallo @Bharat koshti

I tried to re-simulate your case, and it worked correctly on my side, moving to the next step without any issue. Could you please share the OML for this problem , or you in case your can share more details will be better 

here example 

https://personal-oqbcw6a2.outsystemscloud.com/focusgetsoutwhenselectingdropdownva/Requestform?_ts=638830314660504678


focusgetsoutwhenselectingdropdownva.oml
2023-02-28 05-45-34
Bharat koshti

Hello,

I am using Outsystem UI version 2.15.0 even i tried in my personal env which is having 2.20.0 version .it is working fine. but here i am not able to update vesrion ou Outsystem UI as many old applications are there.

this might be issue but javascript should be working on older versions also. even i tried focus method also.

thanks for your reply.

2023-03-24 11-55-45
Pawan Purohit

Hi @Bharat koshti 

Please share the OML file so we can review it and suggest a suitable solution. 

Thanks 


2023-02-28 05-45-34
Bharat koshti

Sorry ,

Due to some restriction i am unable to share OML 

2024-12-10 04-40-04
Gitansh Anand

Hi @Bharat koshti, have you tried adding tabindex attribute to your inputs, please refer to HTML tabindex Attribute for more details.

Thanks
Gitansh Anand

2023-02-28 05-45-34
Bharat koshti

I mension the reason why it is not working, i already tries all this option.

2023-02-28 05-45-34
Bharat koshti

but anyways thanks for the documenatation

2023-01-02 12-23-47
Divyaarthi Sivaraj

Hi Bharat, 

$(document).ready(function() {

  $('#dropdownID').on('change', function() {

    // Retain focus after selection

    $(this).focus();

  });

});


Bind the OnChange event to execute the above script, which will set focus back to the dropdown element after an option is selected. 

I hope this is helpful to you 

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