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

IE9: dropdown preserves focus and prevents async postbacks

16 Answers 191 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
Shukhrat Nekbaev
Top achievements
Rank 1
Shukhrat Nekbaev asked on 31 Mar 2011, 01:14 PM
Hi,

I'm having an issue with IE9, when I select item it does postback, site changes state accordingly, but cursor keeps blinking in the end in the selected item, if I try to click any postback controls of the page - nothing happens, I click somewhere nearby combobox (not all places help) and it loses focus, then I can click everything as normal, I've attached screenshot

Thx!

<telerik:RadComboBox ID="ddlOwnProjects" runat="server" DataTextField="Name" MarkFirstMatch="true"
                AutoPostBack="true" Width="180px" EnableEmbeddedSkins="false" Skin="DefaultGBT"
                DataValueField="Id" LoadingMessage="<%$ Resources:PGC, General_LoadingText %>"
                EmptyMessage="<%$ Resources:PGC, General_DdlPleaseSelectTitle %>" OnSelectedIndexChanged="ddlOwnProjects_SelectedIndexChanged"
                AppendDataBoundItems="true" Visible="true">
                <Items>
                    <telerik:RadComboBoxItem Text="<%$ Resources:PGC, General_DdlPleaseSelectTitle %>" Value="None" Selected="true" Enabled="false" />
                </Items>
            </telerik:RadComboBox>

16 Answers, 1 is accepted

Sort by
0
Dimitar Terziev
Telerik team
answered on 06 Apr 2011, 09:57 AM
Hi Shukhrat,

We have tested this scenario on our side, but we couldn't reproduce the problem you are experiencing.

Could you verify which version of our controls you are using?

In order to troubleshoot this issue, open a support ticket and provide us with sample page where the problem is reproducible so we could examine it locally.

Regards,
Dimitar Terziev
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
0
Shukhrat Nekbaev
Top achievements
Rank 1
answered on 07 Apr 2011, 09:16 AM
Hi,

I've found what was causing the problem, seems like it's doesn't like css styles applied to last div in master page (the position:absolute)
I will submit the ticket soon for you to investigate the issue.

Thx!
0
MFitzpatrick
Top achievements
Rank 1
answered on 17 May 2011, 03:15 PM
Hi-

I have encountered this same issue.

When I change selection on a radcombobox that causes autopostback, the cursor remains at the end of the selected item inside the combo box after the async postback. No other postback controls on the form will work until I change focus from radcombobox by pressing tab or clicking somewhere else on the form.

Shukhrat, can you please give me more details on what was causing the problem for you?

Thanks

Mike
0
Shukhrat Nekbaev
Top achievements
Rank 1
answered on 17 May 2011, 03:23 PM
Hi,

Yeah, there were browser bugs related to IE9 as I was told. Afaik, something do to with css text indentation. Hope that in upcoming release they will fix it also. Awhile, you can try to compare my custon skin file with native telerik, please download here
I'm not facing the problem anymore, at least for now.

Thx! :)
0
Shawn Krivjansky
Top achievements
Rank 1
answered on 15 Jul 2011, 08:16 PM
Same (or very similar) problem here.

I had the problem with 2011 Q1 version of controls, and I just tested with the new 2011 Q2 version and the problem IS STILL there.

Same thing...  IE9 only.
You get the "blinking cursor" at the end of the TEXT portion of the RadCombo.  You CANNOT do anything else on the page that drives a partial post-back... INCLUDING NOT being able to hit the "down-arrow" on the RadCombo itself.

You need to click some place else on the page to get focus away from the RadCombo (to remove the "blinking cursor")...and then all is well again.

I would say it happens at least 80-90% of the time for me (if not more).  I generally use the Vista Skin for my development.  I have not tried changing skins or investigating the Vista skin itself...if this is a CSS issue with the SKIN.

I have entered a support ticket for the issue, but wanted to acknowledge the problem to the communitity in case others have the issue.  I need a fix fast (hence the support ticket) as I will need to change course with using RadCombo for my current project if it won't function with IE9.
0
Thad
Top achievements
Rank 2
answered on 16 Jul 2011, 07:43 PM
Just wanted to add that we have seen the same issue with RadInput controls for the past few releases, but not just with IE9. 

Our scenario is slightly different --  If our RadInput control has focus and there is a default button on the page, pressing the <enter> key to fire a postback results in the same scenario.  Only way we can fix this is by trapping the enter key in RadInput control and setting the focus to some other control prior to the postback firing. 

Here is my post on this.  I got busy and dropped the ball on following up on the ticket, though, so didn't get it resolved officially.
http://www.telerik.com/community/forums/aspnet-ajax/input/radmaskedtextbox-is-possessive-and-keeping-focus-when-enter-key-pressed-to-fire-default-button.aspx

Maybe catching the <enter> key and changing focus with JavaScript will work for you as well.

Thad
0
Shawn Krivjansky
Top achievements
Rank 1
answered on 16 Jul 2011, 07:55 PM
Hmmm.... yeah.  My case is just on a standard drop-down selection from the RadCombo.  So, I guess I could intercept the selected index changed event (server side)... or, in my specific scenario where the RadCombo is part of a filter in a RadGrid... and I am already using the standard javascript for the filter with the OnClientSelectedIndexChanged client event, so I guess I could do it there as well.

Thanks for the suggestion!

But, Telerik does need to look into this, because everytime we use these controls we can't be required to add all this extra code just to get it to function correctly.

Telerik?
0
MFitzpatrick
Top achievements
Rank 1
answered on 18 Jul 2011, 01:10 PM
I have found that (in my scenario) if I set focus to the combo box that triggers the postback in my postback logic, the undesirable behavior is eliminated. Obviously this is not a real solution, but it might serve as your quick fix. Either way, I hope that is helpful.

Mike
0
Shukhrat Nekbaev
Top achievements
Rank 1
answered on 19 Jul 2011, 07:54 AM
Hi,

have you guys tried comparing css I provided above with what is rendered (as current workaround)? I'm using custom skins for dropdown and not facing that problem anymore.
P.S.: afaik, they should have fixed it in next release that came after May 2011, hm.
0
Dimitar Terziev
Telerik team
answered on 19 Jul 2011, 03:32 PM
Hello Guys,

In order to troubleshoot this problem I would need a runnable sample project reproducing the issue? It will be very helpful if anyone could provide such project.

Best wishes,
Dimitar Terziev
the Telerik team

Register for the Q2 2011 What's New Webinar Week. Mark your calendar for the week starting July 18th and book your seat for a walk through of all the exciting stuff we will ship with the new release!

0
MFitzpatrick
Top achievements
Rank 1
answered on 20 Jul 2011, 03:09 PM
I have a project ready that will demonstrate the behavior we are discussing, but I don't know how to upload an entire project. I have never submitted a support ticket before and I'm unsure how to do so. If you can give me some instruction on how to get the sample project to you, I would be more than willing to provide it.

Mike
0
MFitzpatrick
Top achievements
Rank 1
answered on 20 Jul 2011, 03:28 PM
Dimitar-

I figured out how to submit a support ticket for this issue. I attached a sample project with a form that demonstrates the issue. The support ticket number is 445504.

Thanks

Mike
0
Thad
Top achievements
Rank 2
answered on 20 Jul 2011, 03:34 PM
Thank you, Mike!  I was having problems getting together a project to duplicate the issue, so appreciate your efforts!

Thad
0
Tree
Top achievements
Rank 1
answered on 27 Jul 2011, 01:11 AM
Telerik,

Is there a solution to this problem yet? I'm experiencing it with IE9 and Firefox. A .focus() call on the combobox doesn't resolve the problem for me. I have to click outside the combobox in order to make the other controls on the page usable.
0
Shawn Krivjansky
Top achievements
Rank 1
answered on 27 Jul 2011, 02:49 AM
Haven't seen a solution yet, but as a temp workaround, do the .focus on some other control/element (i.e. not the combobox producing the problem).  That worked for me.
0
Dimitar Terziev
Telerik team
answered on 01 Aug 2011, 06:22 PM
Hello Guys,

As it turns out this problem is actually a browser bug, similar to one in IE8 which has already been fixed. The fix for this issue will be available in the next service pack release - expected till the end of September.

As a temporary solution you may use some of the workarounds below:
1)
Copy Code
protected void cboPostBack_SelectedIndexChanged(object sender, Telerik.Web.UI.RadComboBoxSelectedIndexChangedEventArgs e)
    {
        lblPostbackMessage.Text = "You selected the value '" + e.Value + "'";
        cboPostBack.Focus();
    }

2)
Add the following javascript at the end of your "Default.aspx" page:

Copy Code
<script type="text/javascript">
        var $T = Telerik.Web.UI;
 
        $T.RadComboBox.prototype.oldPostback = $T.RadComboBox.prototype.postback;
 
        $T.RadComboBox.prototype.postback = function(command) {
 
            if (!this._postBackReference) return;
 
            if ($telerik.isIE9) this.get_element().focus();
 
            this.oldPostback();
 
        };
 </script>
 

All the best,
Dimitar Terziev
the Telerik team

Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.

Tags
ComboBox
Asked by
Shukhrat Nekbaev
Top achievements
Rank 1
Answers by
Dimitar Terziev
Telerik team
Shukhrat Nekbaev
Top achievements
Rank 1
MFitzpatrick
Top achievements
Rank 1
Shawn Krivjansky
Top achievements
Rank 1
Thad
Top achievements
Rank 2
Tree
Top achievements
Rank 1
Share this question
or