PATCH: MS update KB2586448 breaks RadComboBox MarkFirstMatch in versions older than 2009.3.1314 (inclusive)

21 posts, 0 answers
  1. Telerik Admin
    Telerik Admin avatar
    1679 posts
    Member since:
    Oct 2004

    Posted 28 Oct 2011 Link to this post

    On October 11, 2011, Microsoft released a Cumulative Security Update for Internet Explorer (KB2586448) through Windows Update, which broke RadComboBox when MarkFirstMatch and AllowCustomText were set to true in:
    • Telerik.Web.UI v <= 2009.3.1314 and RadComboBox Classic;
    • All versions of IE from 6 to 9;
    and in the following case:
    • Telerik.Web.UI - some versions;
    • IE9 Compatibility View;
    • Installed Google Toolbar with 'Auto Fill' enabled;

    As an emergency measure we wrote a small patch that fixed the problem. The patch does not address anything else except the problem the update introduced and will not be extended beyond that.

    The problem originates in the ASP.NET AJAX framework, which fires an event one extra time unexpectedly. Perhaps there is something wrong at the DOM level but we have not invested time in investigating the root cause of this yet. If the patch is stable we will not do so in the future as well.

    Below is the code you could put on your pages that are affected if you are using RadComboBox for ASP.NET AJAX:
    <script type="text/javascript">
        var prototype = Telerik.Web.UI.RadComboBox.prototype;
        var set_text = prototype.set_text;
        var propertyChange = prototype._onInputPropertyChange;
     
        prototype.set_text = function (value) {
            this._skipEvent = 0;
            set_text.call(this, value);
        };
     
        prototype._onInputPropertyChange = function () {
            if (!event.propertyName)
                event = event.rawEvent;
            if (event.propertyName == "value") {
                this._skipEvent++;
                if (this._skipEvent == 2)
                    return;
                propertyChange.call(this);
            }
        };
    </script>
    Note: Put the code *after* the ScriptManager on the page or *right before* the </body> closing tag.

    The same patch for RadComboBox Classic is:
    <script type="text/javascript">
        var prototype = RadComboBox.prototype;
        var set_text = prototype.SetText;
        var propertyChange = prototype.OnInputPropertyChange;
     
        prototype.SetText = function (value) {
            this._skipEvent = 0;
            set_text.call(this, value);
        };
     
        prototype.OnInputPropertyChange = function () {
            if (!event.propertyName)
                event = event.rawEvent;
            if (event.propertyName == "value") {
                this._skipEvent++;
                if (this._skipEvent == 2)
                    return;
                propertyChange.call(this);
            }
        };
    </script>
    Note: Put the code *after* the first RadComboBox on the page or *right before* the </body> closing tag.

    Additional Note: The same problem exists with the latest version of Telerik.Web.UI in IE9 Compatibility View Mode only if the Google Toolbar add-on is installed. The above patch only alleviates the problem - it does not fix it completely. We will be investigating this in the future and will update this post if there is progress. In the meantime, you could avoid the problem by disabling the add-on's 'Auto Fill' feature.

    Please share your experience with the patch in this forum thread instead of starting new ones.

    UPDATE: In response to user comments we added a patch for RadComboBox Classic and info about the proper location of both scripts.
  2. Dwayne Trott
    Dwayne Trott avatar
    7 posts
    Member since:
    Nov 2009

    Posted 31 Oct 2011 Link to this post

    Hello,

    I have found that the MarkFirstMatch is buggy with this fix.  It does work for the most part, but I've had a few experiences when the autocomplete doesn't work until I type the next character.  I can be 2 or 3 characters in and all is working as it should and then on the next character the MarkFirstMathc doesn't work until I move on to the next character.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Glenn
    Glenn avatar
    3 posts
    Member since:
    Jul 2012

    Posted 02 Nov 2011 Link to this post

    I've tried removing the specific update and it seems to unload OK and my RadComboBox's work again.

    Our application which uses the RadComboBox extensively is running at many client sites. Only one has loaded the recent MS updates and has been affected by this. I've e-mailed the others and asked them not to deploy any MS updates until we know the cause of the problem... at least now I know which update it is.

    I'm not all that excited about adding this script to every page (60+ pages), especially if it doesn't fix the problem 100%, and then re-deploying the new version.

    Should I...

    • wait...expecting a better fix for this sometime soon
    • ask the sites to never deploy KB2586448
    • update my version of Telerik asap (I know we had to do this eventually... but lots of testing and redeploying still required... I'd prefer not to be doing this in a hurry)

     

  5. Jeff
    Jeff avatar
    1 posts
    Member since:
    Nov 2011

    Posted 07 Nov 2011 Link to this post

    Is there any patch for RadComboBox (NET2) Q1 2009 version ? We can't use the patch explained before because the namespace Telerik.Web.UI does'nt exist ....

    Regards.
    Jeff
  6. m
    m avatar
    1 posts
    Member since:
    Jun 2010

    Posted 11 Nov 2011 Link to this post

    Will there be a patch for ASP.NET RadComboBox (NET2 classic radcontrols suite)? If so when will it be released. We have the same problem as Jeff.
  7. Pankaj
    Pankaj avatar
    6 posts
    Member since:
    Jan 2011

    Posted 05 Dec 2011 Link to this post

    Could you please help me out with RAD Combo Box Controls. I can't ask my users to remove the specific Windows Update and the fix that has been supplied also not working properly.

    Please help.

    Regards,
    Pankaj
  8. Howard Rothman
    Howard Rothman avatar
    3 posts
    Member since:
    Mar 2010

    Posted 06 Dec 2011 Link to this post

    I was unsuccessful using the provided work around.  My client's site is being viewed by all of their Fortune 500 clients and this is not working for any that are using IE with the service pack applied.  Can you please indicate when a solution will be available so I can communicate this to my client?  As you can imagine, this is causing a lot of pain.
  9. Pankaj
    Pankaj avatar
    6 posts
    Member since:
    Jan 2011

    Posted 07 Dec 2011 Link to this post

    I agree with Howard on this.

    Please provide us with some solution as above one is not working properly.

    Regards
  10. Charles
    Charles avatar
    6 posts
    Member since:
    Jul 2012

    Posted 07 Dec 2011 Link to this post

    Same problem here.

    Breaking on this line
        var prototype = Telerik.Web.UI.RadComboBox.prototype;

    Can't tell clients not to deploy Microsoft update, and can't update pages with code because of this reference. What am I missing? How can this be resolved....

  11. Charles
    Charles avatar
    6 posts
    Member since:
    Jul 2012

    Posted 07 Dec 2011 Link to this post

    Same problem here.

    Breaking on this line
        var prototype = Telerik.Web.UI.RadComboBox.prototype;

    Can't tell clients not to deploy Microsoft update, and can't update pages with code because of this reference. What am I missing? How can this be resolved....
  12. Charles
    Charles avatar
    6 posts
    Member since:
    Jul 2012

    Posted 07 Dec 2011 Link to this post

    Same problem here.

    Breaking on this line
        var prototype = Telerik.Web.UI.RadComboBox.prototype;

    Can't tell clients not to deploy Microsoft update, and can't update pages with code because of this reference. What am I missing? How can this be resolved....
  13. Charles
    Charles avatar
    6 posts
    Member since:
    Jul 2012

    Posted 07 Dec 2011 Link to this post

    Same problem here.


    Breaking on this line
        var prototype = Telerik.Web.UI.RadComboBox.prototype;


    Can't tell clients not to deploy Microsoft update, and can't update pages with code because of this reference. What am I missing? How can this be resolved....


    Should there be a ticket opened here? Or we forced to update.....
  14. Charles
    Charles avatar
    6 posts
    Member since:
    Jul 2012

    Posted 07 Dec 2011 Link to this post

    lol!!!!

    i was getting an Opps page saying go back and try again, go to search, home etc... and didn't notice it was actually posting while giving me an opps try again page.... Sorry about the multisubmits.... but.... I do also feel this needs to be addressed asap as this breaks the control ......
  15. iTools
    iTools avatar
    28 posts
    Member since:
    Jun 2007

    Posted 07 Dec 2011 Link to this post

    Hi

    First of all, got to say I'm pretty disappointed with Telerik's support on this matter (and, indeed, any customer problems that are not "straight-forward").

    Anyway, like many other people on this thread, I too found the published patch didn't work in our situation.

    After a bit of troubleshooting, I found this was for a couple reasons:

    • It wasn't explictly stated, but it seems that the code for the patch neeeds to be inserted at the bottom of your page.  It won't work if you put it up in the <head> with other scripts.  I put mine just above the closing </body> tag.
    • We are running 2010.1.415.35 and it seems that many property names have changed.  (I discovered the correct names by running Fiddler and viewing the .axd data that was being sent to the browser).  The following code (adapted from the original patch) seems to work for us:
      <script type="text/javascript">
          var prototype = RadComboBox.prototype;
          var set_text = prototype.SetText;
          var propertyChange = prototype.OnInputPropertyChange;
     
          prototype.SetText = function (value) {
              this._skipEvent = 0;
              set_text.call(this, value);
          };
     
          prototype.OnInputPropertyChange = function () {
              if (!event.propertyName)
                  event = event.rawEvent;
              if (event.propertyName == "value") {
                  this._skipEvent++;
                  if (this._skipEvent == 2)
                      return;
                  propertyChange.call(this);
              }
          };
    </script>

    Anyway, good luck to everyone else who is battling with this problem.

    Cheers

     

  16. Pankaj
    Pankaj avatar
    6 posts
    Member since:
    Jan 2011

    Posted 08 Dec 2011 Link to this post

    Hi Jan ,

    Thanks a lot for your fix. Its working fine on my machine. Just need to test it on my Client's machine.

    Regards,
    Pankaj
  17. kw_uh97
    kw_uh97 avatar
    12 posts
    Member since:
    Sep 2007

    Posted 22 Dec 2011 Link to this post

    How would this solution work in with an aspx pages the has a MasterPages and the RadcomboBox is on an UserControl that's registered to the aspx page? Any suggestion on the best place to put this code?

    Thanks In Advance For Any Help. 
  18. Charles
    Charles avatar
    6 posts
    Member since:
    Jul 2012

    Posted 23 Dec 2011 Link to this post

    Short of removing the controls all together we removed the windows patch and blocked it with windows update service.......

    :S
  19. kw_uh97
    kw_uh97 avatar
    12 posts
    Member since:
    Sep 2007

    Posted 23 Dec 2011 Link to this post

    To get rid of the break on

    var prototype = Telerik.Web.UI.RadComboBox.prototype;

    I placed a Radcombox box on my masterpage wrapped between <div></div>
    after that I place the patch script just above the </body> tag and it appears to work.

    thx to all
  20. kw_uh97
    kw_uh97 avatar
    12 posts
    Member since:
    Sep 2007

    Posted 27 Dec 2011 Link to this post

    Is there a way to check if a page has a single RadComboBox through javascript? I would like to iterate through all the controls on the page and if the page contains a RadComboBox do the patch. I would rather not have to add a RadControl on every one of my Master pages to add the patch. I hope I explained it clearly. Thanks In Advance for Any help.
  21. kw_uh97
    kw_uh97 avatar
    12 posts
    Member since:
    Sep 2007

    Posted 27 Dec 2011 Link to this post

    Not sure if this is the proper or most effective to check if there is not a radcombobox on the page, the most simple way to checks is:

    if

     

     

     

    (typeof (Telerik.Web.UI.RadComboBox) != "undefined") {

    }


    if there is a better way to check please advise. Thanks In advance.

  22. Ivana
    Admin
    Ivana avatar
    657 posts

    Posted 28 Dec 2011 Link to this post

    Hi,

    The following code-block checks if RadComboBox controls are rendered on the page:

    function pageLoad() {
        if (Telerik.Web.UI.RadComboBox == undefined) {
            //There are no RadComboBox controls on the page.
            alert("No RadComboBoxes rendered!");
        } else {
            //Gets the number of the RadComboBox controls rendered on the page.
            var numberOfCombos = Telerik.Web.UI.RadComboBox.ComboBoxes.length;
            alert(numberOfCombos + " RadComboBoxes redered!");
        }
    }

    I hope this helps.

    Kind regards,
    Ivana
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017