Hi,
Using the RadFormDecorator (Q1 2008.1.619.20), setting the focus on any control on IE7 does not work but works as expected in Firefox. Remove RadFormDecorator and IE7 works correctly.
Is there any work around for this?
Thanks,
Khanh
Using the RadFormDecorator (Q1 2008.1.619.20), setting the focus on any control on IE7 does not work but works as expected in Firefox. Remove RadFormDecorator and IE7 works correctly.
<body> |
<form id="form1" runat="server"> |
<telerik:RadFormDecorator ID="RadFormDecorator1" runat="server" DecoratedControls="Buttons" |
Skin="Sunset" /> |
<AjaxToolKit:ToolkitScriptManager EnablePartialRendering="true" ID="ScriptManager1" |
runat="server" CombineScripts="true" /> |
<div> |
<br /> |
<telerik:RadComboBox ID="RadComboBox1" runat="server" MarkFirstMatch="true"> |
<Items> |
<telerik:RadComboBoxItem Value="" Text="" /> |
<telerik:RadComboBoxItem Value="1" Text="1" /> |
<telerik:RadComboBoxItem Value="2" Text="2" /> |
</Items> |
</telerik:RadComboBox> |
<br /> |
<asp:TextBox ID="TextBox1" runat="server"></asp:TextBox> |
<asp:Button ID="button1" runat="server" Text="submit" CssClass="testx" /> |
</div> |
</form> |
</body> |
Protected Sub Page_PreRender(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.PreRender |
ScriptManager.GetCurrent(Page).SetFocus(RadComboBox1) |
End Sub |
Is there any work around for this?
Thanks,
Khanh
11 Answers, 1 is accepted
0
Hello Khanh,
The problem here comes from the fact that the Focus function is executed too early - before the controls are shown (RadFormDecorator initially hides the inputs so it can decorate them). You can verify this by examining the HTML dump of the page:
What I can suggest is to either add the following style on your page:
Which will however, make the decorated controls flicker when page is initially loaded.
As an alternative you can call the autofocus function again when the controls are loaded:
I hope this helps.
Regards,
Georgi Tunev
the Telerik team
Check out Telerik Trainer, the state of the art learning tool for Telerik products.
The problem here comes from the fact that the Focus function is executed too early - before the controls are shown (RadFormDecorator initially hides the inputs so it can decorate them). You can verify this by examining the HTML dump of the page:
<script type="text/javascript"> |
//<![CDATA[ |
WebForm_AutoFocus('RadComboBox1_Input');Sys.Application.initialize(); |
Sys.Application.add_init(function() { |
$create(Telerik.Web.UI.RadFormDecorator, {"clientStateFieldID":"RadFormDecorator1_ClientState","skin":"Default"}, null, null, $get("RadFormDecorator1")); |
}); |
WebForm_InitCallback();Sys.Application.add_init(function() { |
$create(Telerik.Web.UI.RadComboBox, {"_dropDownWidth":0,"_height":0,"_skin":"Default","_text":"","_uniqueId":"RadComboBox1","_value":"","_virtualScroll":false,"clientStateFieldID":"RadComboBox1_ClientState","collapseAnimation":"{\"type\":12,\"duration\":200}","itemData":[{"selected":true},{"value":"1"},{"value":"2"}],"markFirstMatch":true,"selectedIndex":0}, null, null, $get("RadComboBox1")); |
}); |
//]]> |
</script> |
What I can suggest is to either add the following style on your page:
<style> |
input, textarea, button |
{ |
visibility: visible !important; |
} |
</style> |
Which will however, make the decorated controls flicker when page is initially loaded.
As an alternative you can call the autofocus function again when the controls are loaded:
ScriptManager.GetCurrent(Page).SetFocus(RadComboBox1); |
ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "focus", |
"function pageLoad(){ WebForm_AutoFocus('" + RadComboBox1.ClientID + "')}", true); |
I hope this helps.
Regards,
Georgi Tunev
the Telerik team
Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
square.png)
Khanh
Top achievements
Rank 1
answered on 24 Jul 2008, 05:26 PM
Hi Georgi,
Thanks for the quick reply and workaround. Works perfectly.
Khanh
Thanks for the quick reply and workaround. Works perfectly.
Khanh
0

Lee Wilson
Top achievements
Rank 1
answered on 15 Oct 2008, 10:57 AM
I tried the second method and it didn't work.
Please can you show an example of how to implement this in a scenario where the scriptmanager is in a MasterPage, and the RadTextBox to focus is in a UserControl on the MasterPage.
I cannot make changes to the CodeBehind to the MasterPage or the ContentPage. I can make changes to the UserControl and it's CodeBehind.
Thanks
Lee.
Please can you show an example of how to implement this in a scenario where the scriptmanager is in a MasterPage, and the RadTextBox to focus is in a UserControl on the MasterPage.
I cannot make changes to the CodeBehind to the MasterPage or the ContentPage. I can make changes to the UserControl and it's CodeBehind.
Thanks
Lee.
0
Hello Lee,
The original question is related to RadComboBox while in your scenario you use RadTextBox.
We are not sure which Telerik.Web.UI version you are using, but there was discovered a problem with RadFormDecorator coexisting on the same page with RadTextBox in IE only, when
RadFormDecorator DecoratedControls = "All".
We have a couple of suggestions to try out:
1. Set <RadFormDecorator DecoratedControls = "Default" ....>
or, alternatively
2. Later today or tomorrow the Telerik Q3 Futures will be released (which is a public beta of the coming Q3 release). The IE interoperability issue has been fixed, and with the new release your RadTextBox should work OK with RadFormDecorator.
Best regards,
Tervel
the Telerik team
Check out Telerik Trainer, the state of the art learning tool for Telerik products.
The original question is related to RadComboBox while in your scenario you use RadTextBox.
We are not sure which Telerik.Web.UI version you are using, but there was discovered a problem with RadFormDecorator coexisting on the same page with RadTextBox in IE only, when
RadFormDecorator DecoratedControls = "All".
We have a couple of suggestions to try out:
1. Set <RadFormDecorator DecoratedControls = "Default" ....>
or, alternatively
2. Later today or tomorrow the Telerik Q3 Futures will be released (which is a public beta of the coming Q3 release). The IE interoperability issue has been fixed, and with the new release your RadTextBox should work OK with RadFormDecorator.
Best regards,
Tervel
the Telerik team
Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0

Roland
Top achievements
Rank 1
answered on 20 Apr 2009, 07:48 PM
I have observed the same behaviour with Telerik.Web.UI 2008.3.1314.35. I have FormDecorador set to decorate Buttons only and the focus is set on text boxes
0
Hello Roland,
Please upgrade to a recent version of the control and you will not experience this problem anymore.
Regards,
Georgi Tunev
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Please upgrade to a recent version of the control and you will not experience this problem anymore.
Regards,
Georgi Tunev
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0

Roland
Top achievements
Rank 1
answered on 22 Apr 2009, 03:01 PM
I have upgraded to 2009.1.402.35.
RadFormDecorador set to decorade Buttons
Form has radtextbox txt.Focus().
When I load page and press tab, it goes to navigation bar in IE7 and works fine in FF3 (goes to next tabindex).
Additionally Update panel does not show the image, but white spot.
Removed the temporary asp.net files.
Cleared browser cache.
RadFormDecorador set to decorade Buttons
Form has radtextbox txt.Focus().
When I load page and press tab, it goes to navigation bar in IE7 and works fine in FF3 (goes to next tabindex).
Additionally Update panel does not show the image, but white spot.
Removed the temporary asp.net files.
Cleared browser cache.
0
Hi Roland,
I tried to reproduce the problem but to no avail (sample page and video capture are attached to this thread). Could you please open a support ticket and send me a small sample project where the problem could be reproduced? I will check it right away.
Kind regards,
Georgi Tunev
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
I tried to reproduce the problem but to no avail (sample page and video capture are attached to this thread). Could you please open a support ticket and send me a small sample project where the problem could be reproduced? I will check it right away.
Kind regards,
Georgi Tunev
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0

Roland
Top achievements
Rank 1
answered on 28 Apr 2009, 03:34 PM
Thank you for the files.
I have created test project from the scratch and the bug does not occurred anymore.
After a short investigation, another of the 3rd party control were interfering somehow with scripts.
Thank you for replies.
I have created test project from the scratch and the bug does not occurred anymore.
After a short investigation, another of the 3rd party control were interfering somehow with scripts.
Thank you for replies.
0

Matt
Top achievements
Rank 1
answered on 09 Nov 2012, 09:11 PM
It's 2012 and even with the latest code, it still doesn't work.
0
Hello Matt,
Could you explain exactly what does not work at your side? Is that the focus event in the code behind or the proper displaying of the RadTextBox? Could you also confirm your browser and its version. I am asking because there were some issues related to RadFormDecorator and RadTextBox which have been fixed in the lastest internal build. Could you try using the latest internal build to see if you are still having issues:http://www.telerik.com/account/your-products/internal-builds.aspx?
I am attaching VS example and video to show my scenario in the RadFormDecorator_focus.zip archive. If you are still having problems could you modify my page to show them and post it here so we can actually investigate the case?
Regards,
Danail Vasilev
the Telerik team
Could you explain exactly what does not work at your side? Is that the focus event in the code behind or the proper displaying of the RadTextBox? Could you also confirm your browser and its version. I am asking because there were some issues related to RadFormDecorator and RadTextBox which have been fixed in the lastest internal build. Could you try using the latest internal build to see if you are still having issues:http://www.telerik.com/account/your-products/internal-builds.aspx?
I am attaching VS example and video to show my scenario in the RadFormDecorator_focus.zip archive. If you are still having problems could you modify my page to show them and post it here so we can actually investigate the case?
Regards,
Danail Vasilev
the Telerik team
Explore the entire set of ASP.NET AJAX controls we offer here and browse the myriad online demos to learn more about the components and the features they incorporate.