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

Cancel Focus on Button

1 Answer 72 Views
ToolBar
This is a migrated thread and some comments may be shown as answers.
terrysmith
Top achievements
Rank 1
terrysmith asked on 24 Apr 2008, 04:37 PM
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,
Terry

1 Answer, 1 is accepted

Sort by
0
Erjan Gavalji
Telerik team
answered on 25 Apr 2008, 10:54 AM
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, "");
        args.get_item().blur();
        args.get_item().disable();

    }

I hope this helps.

Cheers,
Erjan Gavalji
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
Tags
ToolBar
Asked by
terrysmith
Top achievements
Rank 1
Answers by
Erjan Gavalji
Telerik team
Share this question
or