RadTextBox width calculation bug in Q2 '13 release that affects IE8<=

4 posts, 0 answers
  1. Mike
    Mike avatar
    36 posts
    Member since:
    Sep 2012

    Posted 29 Jul 2013 Link to this post

    Hello,

    FYI - We recently downloaded the latest Q2 '13 Telerik update and noticed a problem with RadTextboxes and versions of IE before IE9 (and using IE compat mode in IE9 and 10). Basically, the width calculation of the textboxes were off if you used % width on the mark up (e.g <telerik:RadTextBox ID="MyTextBox" Width="100%" runat=server">.

    I traced it to be an issue with the internal _reducePixelWidthByPaddings() function. What was happening is that this function was being called multiple times (I think 5) as part of the load/repaint() process. As a result, the width of the text box was getting smaller and smaller each time. To fix, I put the following client-side code in:

    if (typeof (Telerik) != "undefined" && typeof (Telerik.Web.UI.RadInputControl) != "undefined")
    {
    Telerik.Web.UI.RadInputControl.prototype._origReducePixelWidthByPaddings = Telerik.Web.UI.RadInputControl.prototype._reducePixelWidthByPaddings;
    Telerik.Web.UI.RadInputControl.prototype._reducePixelWidthByPaddings = function ()
    {
    if (!this._reducedPixelWidthFlag)
    this._origReducePixelWidthByPaddings();
    }
    }

    Reporting this in hopes that a proper fix makes it into a future release.

    Thanks,

    - Mike Oliver
  2. Galin
    Admin
    Galin avatar
    526 posts

    Posted 01 Aug 2013 Link to this post

    Hi Mike,

    I tried the described scenario in Compatibility Mode and IE 7, but on my side the method is called only once.
    Could you please elaborate a bit more on this matter, which version of controls you are using and possible send us the code you are using?

    Looking forward to your reply.

    Regards,
    Galin
    Telerik
    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 the blog feed now.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Mike
    Mike avatar
    36 posts
    Member since:
    Sep 2012

    Posted 01 Aug 2013 Link to this post

    Galin,

    The build/date # of the Telerik release I'm using is 2013.2.717.40. The file date is 7/16/13.

    I can't easily provide a code snippet because our usage of RadTextboxes are a bit involved. Here is the scenario, however:

    - RadGrid with a GridBoundColumns that use a FilterTemplate. These filter templates then create a RadTextBox control programatically server-side that set width = 100% (such that the grid filter takes up the full width of the column

    - Client side, on page load, we are sizing the grid - perhaps this is the reason why the RadTextBox repaint() function gets called a few times, which subsequently causes _reducePixelWidthByPaddings() to be called a few times via the window.setTimeout() in the repaint() function. Because _reducePixelWidthByPaddings is called via a timeout, the bool check doesn't really work as its coded in the Telerik script in this release. That's why I had to code the work-around below - to do the bool check once _reducePixelWidthByPaddings() is called and before executing any of its original code.

    Regards,

    - Mike

  5. Galin
    Admin
    Galin avatar
    526 posts

    Posted 06 Aug 2013 Link to this post

    Hi Mike,

    Thank you for the corporation and providing more information about this issue. It is forwarded to our developers and they will investigate and research on possible resolution.

    Regards,
    Galin
    Telerik
    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 the blog feed now.
Back to Top