Cancel Focus on Button

2 posts, 0 answers
  1. terrysmith
    terrysmith avatar
    127 posts
    Member since:
    Nov 2006

    Posted 24 Apr 2008 Link to this post

    I have a toolbar button which cancels the postback to the server and then updates an AJAX panel on the page. When this completes the toolbar button is still highlighted. I have to click somewhere else for the highlight to go away.

    This is not a major bug I know, but since the button's action has been completed it really shouldn't be highlighted anymore. I have multiple buttons with this behavior too. Is there a way I can fix this? I made a guess and tried setting button.set_focused(false); after canceling the event propagation, but this doesn't seem to do anything. It doesn't blow up either, so I'm guessing the set_focused method is there.

    Any suggestions?

    Thank you,

  2. Erjan Gavalji
    Erjan Gavalji avatar
    1455 posts

    Posted 25 Apr 2008 Link to this post

    Hi Terry,

    Thanks for the report. The bug is already fixed in the production environment. You can use the following workaround (as posted in the Disabled button / Inverted Hover Behavior post):

    function onClientButtonClicking(sender, args)
            args.get_item().get_element().className = args.get_item().get_element().className.replace(/rtbItemHovered /ig, "");


    I hope this helps.

    Erjan Gavalji
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  3. DevCraft R3 2016 release webinar banner
Back to Top