Focus broken in Q2 2012

6 posts, 0 answers
  1. Mihai Dinculescu
    Mihai Dinculescu avatar
    33 posts
    Member since:
    Nov 2009

    Posted 06 Aug 2012 Link to this post

    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.
  2. Vasil
    Admin
    Vasil avatar
    1547 posts

    Posted 07 Aug 2012 Link to this post

    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.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Marian
    Marian avatar
    49 posts
    Member since:
    Sep 2008

    Posted 27 Aug 2012 Link to this post

    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
    }
  5. Mihai Dinculescu
    Mihai Dinculescu avatar
    33 posts
    Member since:
    Nov 2009

    Posted 29 Aug 2012 Link to this post

    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.
  6. Marian
    Marian avatar
    49 posts
    Member since:
    Sep 2008

    Posted 29 Aug 2012 Link to this post

    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
  7. Vasil
    Admin
    Vasil avatar
    1547 posts

    Posted 30 Aug 2012 Link to this post

    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.
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017