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

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

3 Answers 21 Views
Input
This is a migrated thread and some comments may be shown as answers.
Mike
Top achievements
Rank 1
Mike asked on 29 Jul 2013, 07:12 PM
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

3 Answers, 1 is accepted

Sort by
0
Galin
Telerik team
answered on 01 Aug 2013, 08:19 PM
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.
0
Mike
Top achievements
Rank 1
answered on 02 Aug 2013, 12:24 AM
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

0
Galin
Telerik team
answered on 06 Aug 2013, 02:04 PM
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.
Tags
Input
Asked by
Mike
Top achievements
Rank 1
Answers by
Galin
Telerik team
Mike
Top achievements
Rank 1
Share this question
or