This is a migrated thread and some comments may be shown as answers.

Focus not being set on textbox.

2 Answers 146 Views
Input
This is a migrated thread and some comments may be shown as answers.
Robert
Top achievements
Rank 1
Robert asked on 29 Dec 2009, 03:10 PM
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 Answers, 1 is accepted

Sort by
0
Dimo
Telerik team
answered on 29 Dec 2009, 03:21 PM
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.
0
Robert
Top achievements
Rank 1
answered on 29 Dec 2009, 03:57 PM
Ok 

I submitted ticket: 269773
Tags
Input
Asked by
Robert
Top achievements
Rank 1
Answers by
Dimo
Telerik team
Robert
Top achievements
Rank 1
Share this question
or