IE9: dropdown preserves focus and prevents async postbacks

17 posts, 0 answers
  1. Shukhrat Nekbaev
    Shukhrat Nekbaev avatar
    73 posts
    Member since:
    Oct 2010

    Posted 31 Mar 2011 Link to this post

    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>
  2. Dimitar Terziev
    Admin
    Dimitar Terziev avatar
    1266 posts

    Posted 06 Apr 2011 Link to this post

    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
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Shukhrat Nekbaev
    Shukhrat Nekbaev avatar
    73 posts
    Member since:
    Oct 2010

    Posted 07 Apr 2011 Link to this post

    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!
  5. MFitzpatrick
    MFitzpatrick avatar
    24 posts
    Member since:
    Jul 2010

    Posted 17 May 2011 Link to this post

    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
  6. Shukhrat Nekbaev
    Shukhrat Nekbaev avatar
    73 posts
    Member since:
    Oct 2010

    Posted 17 May 2011 Link to this post

    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! :)
  7. Shawn Krivjansky
    Shawn Krivjansky avatar
    86 posts
    Member since:
    Jan 2010

    Posted 15 Jul 2011 Link to this post

    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.
  8. Thad
    Thad avatar
    106 posts
    Member since:
    Sep 2010

    Posted 16 Jul 2011 Link to this post

    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
  9. Shawn Krivjansky
    Shawn Krivjansky avatar
    86 posts
    Member since:
    Jan 2010

    Posted 16 Jul 2011 Link to this post

    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?
  10. MFitzpatrick
    MFitzpatrick avatar
    24 posts
    Member since:
    Jul 2010

    Posted 18 Jul 2011 Link to this post

    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
  11. Shukhrat Nekbaev
    Shukhrat Nekbaev avatar
    73 posts
    Member since:
    Oct 2010

    Posted 19 Jul 2011 Link to this post

    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.
  12. Dimitar Terziev
    Admin
    Dimitar Terziev avatar
    1266 posts

    Posted 19 Jul 2011 Link to this post

    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!

  13. MFitzpatrick
    MFitzpatrick avatar
    24 posts
    Member since:
    Jul 2010

    Posted 20 Jul 2011 Link to this post

    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
  14. MFitzpatrick
    MFitzpatrick avatar
    24 posts
    Member since:
    Jul 2010

    Posted 20 Jul 2011 Link to this post

    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
  15. Thad
    Thad avatar
    106 posts
    Member since:
    Sep 2010

    Posted 20 Jul 2011 Link to this post

    Thank you, Mike!  I was having problems getting together a project to duplicate the issue, so appreciate your efforts!

    Thad
  16. Tree
    Tree avatar
    111 posts
    Member since:
    Nov 2005

    Posted 26 Jul 2011 Link to this post

    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.
  17. Shawn Krivjansky
    Shawn Krivjansky avatar
    86 posts
    Member since:
    Jan 2010

    Posted 26 Jul 2011 Link to this post

    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.
  18. Dimitar Terziev
    Admin
    Dimitar Terziev avatar
    1266 posts

    Posted 01 Aug 2011 Link to this post

    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.

Back to Top
UI for ASP.NET Ajax is Ready for VS 2017