Focus not being set on textbox.

3 posts, 0 answers
  1. Robert
    Robert avatar
    199 posts
    Member since:
    Aug 2009

    Posted 29 Dec 2009 Link to this post

    I am trying to set focus on a radtextbox using the following function called on the ClientEvents-OnBlur event:
    The problem is that when I remove the text and tab away, focus is not set. If I continue tabbing back to that field the onblur event fires again but it does set focus.  Why is this failing on my first onBlur event being fired and successful on the second onBlur event firing?


      function ValidateTitle(oTitle, args) {
        if (oTitle.get_value()=='') {
         oTitle.focus();
          }
      }  

    <telerik:RadTextBox
     ID="txtTitle"
     runat="server"
     Rows="3"
     TextMode="MultiLine"
     Width="362px"
     MaxLength="4000"
     ToolTip="Title"
     CausesValidation="True"
     ClientEvents-OnBlur="ValidateTitle">
    </telerik:RadTextBox>
  2. Dimo
    Admin
    Dimo avatar
    8482 posts

    Posted 29 Dec 2009 Link to this post

    Hi Robert,

    Do you have something focusable after the RadTextBox? If not, then after tabbing out of it, the cursor goes to the address bar and cannot be returned back to the control, e.g. in IE.

    If this is your scenario, add some hyperlink or textbox after the RadTextBox and move it out of sight with CSS styles.

    If the above information is not applicable, send us a runnable page, as I can't reproduce the problem on a simple page.

    Regards,
    Dimo
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  3. Robert
    Robert avatar
    199 posts
    Member since:
    Aug 2009

    Posted 29 Dec 2009 Link to this post

    Ok 

    I submitted ticket: 269773
Back to Top