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

Focus broken in Q2 2012

5 Answers 73 Views
Input
This is a migrated thread and some comments may be shown as answers.
Mihai Dinculescu
Top achievements
Rank 1
Mihai Dinculescu asked on 06 Aug 2012, 07:21 PM
After upgrading to Q2 2012 I quickly noticed 2 issues:

1.
myradinput.Focus();
No longer focuses the control.

2.
function(sender, args) { $get('" + BadgeNo.ClientID + "' + '_text').focus(); }
Throws a JS error saying something like object not found.

The 2nd Issue I fixed by removing the _text suffix however this is of course not something acceptable.

For the 1st issue I found no fix so I was forced to revert back to Q1.

5 Answers, 1 is accepted

Sort by
0
Vasil
Telerik team
answered on 07 Aug 2012, 06:57 AM
Hi Mihai,

See this demo, it uses the latest RadControls, and the focus works correctly:
http://demos.telerik.com/aspnet-ajax/input/examples/common/focus/defaultcs.aspx

I would suggest you you upgrade to Q2 SP1

Kind regards,
Vasil
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
0
Marian
Top achievements
Rank 2
answered on 27 Aug 2012, 06:34 PM
Hi,
I installed Q2/2012 just now and I also found different focus behavior on server side (previous used version Q2/2011). Textbox to be focused is for me in custom server control (ascx) which exposes for caller method SetFocusOnLoginName. Code below works for me:

public void SetFocusOnLoginName()
{
    RadTextBox tb = RadPanelBar1.SelectedItem.Items[0].FindControl("UserName") as RadTextBox;
    if (tb != null)
        // tb.Focus();  works for Q2/2011
        RadAjaxManager.GetCurrent(this.Page).FocusControl(tb.ClientID); // works for Q2/2012
}
0
Mihai Dinculescu
Top achievements
Rank 1
answered on 29 Aug 2012, 03:01 PM
Thank you for your solutions but I created this thread mainly to state that this kind of changes that break code without even throwing an error are not acceptable. I can't possibly go trough the dozens of applications I wrote and test if every focus works correct.

Until now for the past 2 years I was eagerly upgrading to every new version. Now it looks like I'm stuck with Q1 2012 for a long time.
0
Marian
Top achievements
Rank 2
answered on 29 Aug 2012, 05:12 PM
Hi Mihai,
I fully understand you. My situation is the same. I am also not happy if I must replace working code with the new one.
This is the reason why I still use Q2/2011. Currently Q2/2012 is out. I installed this version because former versions have
problem with defaultbutton (FYI my post http://www.telerik.com/community/forums/aspnet-ajax/general-discussions/problem-with-defaultbutton-in-q1-2012.aspx ) and it seems that defaulbutton is working correctly now, but focus is new unexpected surprise for me.
New enhancements of telerik controls are welcomed, but old behaviors of them should be stabil.
I hope that Q3 will be OK otherwise my last subscription period is realy unused.
-Marian
0
Vasil
Telerik team
answered on 30 Aug 2012, 07:50 AM
Hello,

We fixed the issue, and it should work properly into the next internal build that will be uploaded in Tuesday. And in the Service Pack 2 for Q2 2012 it will be no problem with the focusing from server side.

Kind regards,
Vasil
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Tags
Input
Asked by
Mihai Dinculescu
Top achievements
Rank 1
Answers by
Vasil
Telerik team
Marian
Top achievements
Rank 2
Mihai Dinculescu
Top achievements
Rank 1
Share this question
or