Hey Telerik and other gurus!
Odd scenario when using RadInput controls...
Please see the attached image - BeforePressingEnter.png --- The Add button is the default button (ImageButton). The green area is a DIV. When the Add button is clicked, it uses jQuery to collapse the green div and set focus to the next control on the form using RadAjaxManager.GetCurrent(control.Page).FocusControl(control);.
When focus is ON the phone number masked edit box and the user presses enter, sometimes (but not always), the RadMaskedTextBox gets a little clingy and doesn't want to give up it's focus. What the user sees is what you see in AfterPressingEnter.png. Notice the cursor is where the masked text box is before the green area is collapsed.
When focus is on any other control pictured or if you manually click on the Add button focus moves as is appropriate.
This same situation has been observed when we have a RadGrid using InPlace editing and one of the controls in the EditTemplate is a RadInput control. I've seen other similar posts in the RadGrid forums regarding how to use the enter key to cause the grid to save the changes, but there was no solution offered up there.
Got any ideas Telerik?
A "work-around" we have implemented is to capture the enter key on the client side keydown event of the RadNumericTextBox and set focus to the Add button.
This appears to only occur in IE. Firefox 3.6.3 and Chrome 8.0.552 both seem to be immune to this situation.
Thanks!
Thad
Odd scenario when using RadInput controls...
Please see the attached image - BeforePressingEnter.png --- The Add button is the default button (ImageButton). The green area is a DIV. When the Add button is clicked, it uses jQuery to collapse the green div and set focus to the next control on the form using RadAjaxManager.GetCurrent(control.Page).FocusControl(control);.
When focus is ON the phone number masked edit box and the user presses enter, sometimes (but not always), the RadMaskedTextBox gets a little clingy and doesn't want to give up it's focus. What the user sees is what you see in AfterPressingEnter.png. Notice the cursor is where the masked text box is before the green area is collapsed.
When focus is on any other control pictured or if you manually click on the Add button focus moves as is appropriate.
This same situation has been observed when we have a RadGrid using InPlace editing and one of the controls in the EditTemplate is a RadInput control. I've seen other similar posts in the RadGrid forums regarding how to use the enter key to cause the grid to save the changes, but there was no solution offered up there.
Got any ideas Telerik?
A "work-around" we have implemented is to capture the enter key on the client side keydown event of the RadNumericTextBox and set focus to the Add button.
This appears to only occur in IE. Firefox 3.6.3 and Chrome 8.0.552 both seem to be immune to this situation.
Thanks!
Thad