Hi,
I found an error in Tabs of ajax control toolkit, I have downloaded the last version of June 2012 Release, the erros occors in the other versions too.
The error consist in have a TabContainer inside a Tab of other TabContainer, inside an update panel.
When run the application an error of "Can't move focus to the control because it is invisible, not enabled, or of a type that does not accept the focus."
The error occors only in the IE 8, I dont have IE 7 for test. The error dont occors in IE 9 compatibility mode.
I have resolved this error, add a try/catch block in js script "Tabs.pre.js" where the focus of tab is set.
Attachment the application that occors the bug.
Ivan Patrick.
Comments: I'm having the same issue. In our case we have a main page with a tab control and 3 - 6 tabs (I'm sorry that I can provide the code here, but I'll try to describe the structure in case it helps someone). Within each main tab, we have another tabcontrol with sometimes only 1, sometimes up to 7 (sub)tabs. In all browsers we've tested everything works fine, but an exception occurs in IE8 ("Can't move focus to the control because it is invisible, not enabled, or of a type that does not accept the focus"), resulting in incorrect rendering of the page (main tabcontrol is not rendered/visible). We've tried all sorts to fix it - about 6 different versions of the Ajax toolkit (ASP 3.5; VS 2008 SP1), different jQuery versions (just in case), HTML validation (which pointed me to an additional problem with duplicated id's in tabcontrol divs created by the toolkit, which I have also not been able to overcome). In the end I simplified the code and found the offending piece of code, but have not been able to find a solution yet. The exception occurs when we add a tabcontrol to the second tab of the main tab control (where the first tab in the main tab control will have initial focus as per default). I suspect the javascript generated by the toolkit tries to focus on the first tab of the tab control in the second main tab, and not finding it (because only the first main tab is visible when the page is loaded). But it's pure guesswork. It sounds like the same problem noted here, but this one is set to closed even though lots of folk experience the same thing way after it was closed: [https://ajaxcontroltoolkit.codeplex.com/workitem/27053](https://ajaxcontroltoolkit.codeplex.com/workitem/27053) I don't know whether the Javascript solution (try/catch block) would work here, but my next step is probably to try and compile my own toolkit dll to see if that resolves it.
I found an error in Tabs of ajax control toolkit, I have downloaded the last version of June 2012 Release, the erros occors in the other versions too.
The error consist in have a TabContainer inside a Tab of other TabContainer, inside an update panel.
When run the application an error of "Can't move focus to the control because it is invisible, not enabled, or of a type that does not accept the focus."
The error occors only in the IE 8, I dont have IE 7 for test. The error dont occors in IE 9 compatibility mode.
I have resolved this error, add a try/catch block in js script "Tabs.pre.js" where the focus of tab is set.
Attachment the application that occors the bug.
Ivan Patrick.
Comments: I'm having the same issue. In our case we have a main page with a tab control and 3 - 6 tabs (I'm sorry that I can provide the code here, but I'll try to describe the structure in case it helps someone). Within each main tab, we have another tabcontrol with sometimes only 1, sometimes up to 7 (sub)tabs. In all browsers we've tested everything works fine, but an exception occurs in IE8 ("Can't move focus to the control because it is invisible, not enabled, or of a type that does not accept the focus"), resulting in incorrect rendering of the page (main tabcontrol is not rendered/visible). We've tried all sorts to fix it - about 6 different versions of the Ajax toolkit (ASP 3.5; VS 2008 SP1), different jQuery versions (just in case), HTML validation (which pointed me to an additional problem with duplicated id's in tabcontrol divs created by the toolkit, which I have also not been able to overcome). In the end I simplified the code and found the offending piece of code, but have not been able to find a solution yet. The exception occurs when we add a tabcontrol to the second tab of the main tab control (where the first tab in the main tab control will have initial focus as per default). I suspect the javascript generated by the toolkit tries to focus on the first tab of the tab control in the second main tab, and not finding it (because only the first main tab is visible when the page is loaded). But it's pure guesswork. It sounds like the same problem noted here, but this one is set to closed even though lots of folk experience the same thing way after it was closed: [https://ajaxcontroltoolkit.codeplex.com/workitem/27053](https://ajaxcontroltoolkit.codeplex.com/workitem/27053) I don't know whether the Javascript solution (try/catch block) would work here, but my next step is probably to try and compile my own toolkit dll to see if that resolves it.