Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
1922
select the text of a dropdown when the user clicks it:
posted

Our scenario: We do have a webdropdown on a page with autocomplete enabled. When the user tabs into the control, the text is selected and he can start overwriting it. When he clicks the control, the text is selected for some miliseconds, but then automatically gets deselected and the cursor starts to blink.

So the user can't start to type immediately. Instead he has to select or clear the text manualy before.

As we weren't able to find something in the help, we came up with the following solution to this problem:

$(document).ready(function(){

   $('.igdd_ValueDisplay').click(function(){
       this.select();
    });
});

My question is: Is there a better way? Maybe a property that I can set on the server side?

Thanks,

Andre

Parents
No Data
Reply
  • 24671
    Verified Answer
    posted

    Hi Andre,

    Your code above shows one pretty good and compact way to do this :) We currently don't have a server-side property to control this behavior, but I will make sure it's added to the backlog for future releases.

    Thank you,

    Angel 

Children
No Data