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

IE8 focus javascript error when displaying alerts on toolbar clicks

1 Answer 33 Views
ToolBar
This is a migrated thread and some comments may be shown as answers.
Mike
Top achievements
Rank 1
Mike asked on 20 Jul 2010, 11:57 PM
There's a very basic error in the latest RadToolbar release. If your client-side OnClientButtonClicked handler calls alert() or confirm() when a drop down button has been clicked, you'll get the following javascript error when using IE8 (doesn't happen in other browsers):

Line: 5012
Error: Can't move focus to the control because it is invisible, not enabled, or of a type that does not accept the focus. Example handler:

 
        function Toolbar_Clicked(sender, args)
        {
            clearInactive();
 
            var button = args.get_item();
            var command = button.get_commandName();
 
            switch (command)
            {
                case "RESOLVE": // command for button in toolbar drop down
                    alert("This message box will cause the javascript error once it has been dismissed.");
                    break;
}
}

There is a workaround - if I do the same functionality on a different thread (e.g. calling window.setTimeout(myfuncthatcallsalert, 5)), all is well.

Is this a known issue? Fixed anytime soon?

Thanks

1 Answer, 1 is accepted

Sort by
0
Yana
Telerik team
answered on 26 Jul 2010, 09:25 AM
Hello Mike,

I've tested this code but wasn't able to observe the issue. Please send us the code of your page so that we to be able to reproduce the problem. Thanks in advance

Best wishes,
Yana
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
ToolBar
Asked by
Mike
Top achievements
Rank 1
Answers by
Yana
Telerik team
Share this question
or