With this setup, I just updated to jQuery 1.6 and there is an issue with Telerik windows where when you open and close windows, each time you open, the window gets smaller and smaller. I switched back to jQuery 1.5.2 for now where the problem does not exist.
20 Answers, 1 is accepted

I was wondering if there was a fix for this? I'm working against jQuery 1.6 and have the same problem.
Thanks,
Mark.
Have you tried using jQuery 1.6.1? There are known issues with jQuery 1.6 which were later addressed by jQuery 1.6.1.
Regards,Atanas Korchev
the Telerik team

* If you try to resize a Window then jQuery 1.6.1 will throw an exception "Cannot call method 'replace' of undefined"
* If you have a Window with a lot of content in it and then replace the content of a Window like this:
$('#Window').data('tWindow').content('New smaller content');The window will not automatically shrink to accommodate the new smaller content space. Using .refresh() or not specifying width or height of window does not make a difference.
Thank you for reporting this issue.
I am glad to inform you that this bug is fixed and it will be include with next official release of the Telerik Components for ASP.NET MVC.
I have attached modified telerik.window.js file.
I have updated your Telerik points.
Hristo Germanov
the Telerik team

I have attached a simple test project along with hotfix version of the Telerik Components for ASP.NET MVC. Could you please examine it and tell me if it works for you?
Please note this that if you resize the MVC Window you give it a fixed size. Then if you want to set smaller or bigger content you need to reset those height and width(set from client by resizing):
var window = $("#Window").data("tWindow");
$(window.element).find(".t-window-content").css("height", "auto").css("width", "auto");
window.content("Content test");
If you report more information about these bugs in the MVC Editor we will do our best to fix them.
Kind regards,
Hristo Germanov
the Telerik team

I appreciate your help but unfortunately it doesn't solve the issues. Please try adding a simple Editor into the Window like this:
<
p
style
=
"text-align: center"
>
The Telerik Window for ASP.NET MVC is<
br
/> the right choice for creating Window dialogs<
br
/>
and alert/prompt/confirm boxes<
br
/> in your ASP.NET MVC applications.
</
p
>
<%= Html.Telerik().Editor().Name("comment")%>
<
input
type
=
"button"
onclick
=
"changeContent()"
value
=
"change content"
/>
When I run it in IE9, I immediately see two bugs (see attached screenshot):
1. If I drag (move) the Telerik Window to the left, the right edge of the Window object will stick to the right edge of the browser, effectively resizing it.
2. The Editor content area width is fixed and will not automatically extend to fit the width of the containing Window, like the Editor Toolbar does.
I didn't spend any more time looking for other bugs. With all due respect, these are fundamental bugs that should only exist in a beta product.
1. This is not an issue because you have window with width 100% and editor with width100%. Please try to set minWidth or width to the editor or to the window.
2. The bug is fixed and it will be include with next oficial release. I have attached the hotfix version of the Telerik Components for ASP.NET MVC.
I have updated your telerik points.
Hristo Germanov
the Telerik team

<% Html.Telerik().Window()
.Name("Window")
.Title("Telerik Window for ASP.NET MVC")
.Draggable(true)
.Resizable(resizing => resizing
.Enabled(true)
)
.Modal(true)
.Width(500)
.Scrollable(true)
.Buttons(b => b.Maximize().Close())
.Content(() =>
{%>
<
p
style
=
"text-align: center"
>
The Telerik Window for ASP.NET MVC is<
br
/> the right choice for creating Window
dialogs<
br
/>
and alert/prompt/confirm boxes<
br
/> in your ASP.NET MVC applications.
</
p
>
<%= Html.Telerik().Editor().Name("comment")%>
<
input
type
=
"button"
onclick
=
"changeContent()"
value
=
"change content"
/>
<%})
.Render();
%>
...and then try to resize the window from the bottom right, I get the attached Javascript error in telerik.window.min.js. I seem to hit a bug within 10 seconds, everytime I use the Telerik MVC extensions.
Please don't update my points again for finding another obvious bug for you. I am done.
I have attached the modified telerik.window.min.js. Could you please update the JavaScript file.
All the best,Hristo Germanov
the Telerik team

<%
Html.Telerik().Window().Name(windowId)
.Title(Model.Title)
.Modal(true)
.Draggable(true)
.Width(300)
.Height(150)
.Content(() =>
{
%>
<
div
style
=
"padding: 10px;"
>
<
div
><
h2
class
=
'contact-name'
>Some Name</
h2
></
div
>
<
div
><
a
class
=
'email-address'
href
=
"#"
>email address</
a
></
div
>
<
div
class
=
'phone'
>111-111-1111</
div
>
</
div
>
<%
})
.Visible(false)
.Render();
%>
...
var window = $('#' + windowId);
window.data('tWindow').center().open();

@Neil: We are very sorry to hear that your issue remained unresolved. Could you please let us know which issue that is? Is this the same as the one discussed in this thread?
@Simit: We could not reproduce the issue in the 2011.2.712 build with either jquery 1.5.1, nor 1.6.2, in FF, IE9, IE9Compat and Chrome.
You can find the test sample project attached.
Alex Gyoshev
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

We discovered that the issue is caused by a style that is applied by accident to the window content area. The following CSS fixes the issue in the Sitefinity skin and is included in new builds:
.t-window-content
{
border-width: 0;
}
If you have problems applying this with your custom theme, please send it our way so that we can provide further assistance.
All the best,
Alex Gyoshev
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


I am currently having the same issue that it appears others are having with the shrinking modal windows. We are using Telerik Extensions for ASP.NET MVC version 11.2.914.0 and jQuery 1.6.2. We initially setup the default theme but we have fully customized it now so it is not specific to a theme.
what we have is a list of questions with radio button answers. when the user clicks an answer it pops up a the same modal with dynamically injected content (the content is always the same therefore always the same size). The modal has a set width and height however, each time i launch the modal (after the first 2 times), it gets smaller and smaller. The first 2 times I open it it is fine, but then every modal after that gets progressively smaller and smaller
I already applied your .t-window-content { border-width:0; } fix and it didn't do anything. I have attached 3 screenshots with an open Firebug so you can see the sizes shrinking.
We need a fix for this ASAP. Thanks
We could not reproduce the issue with the latest build -- the sample project used for testing is attached. Please provide more details, and if possible, show it in the sample project.
Best wishes,
Alex Gyoshev
the Telerik team

I am able to repro this issue using chrome and, v2011.3.1115. However, I am only able to repro it if I close the window before it has the chance to be fully displayed. Basically I show the window at the start of an ajax call, and close it when I get an answer. The ajax call however takes less time to execute than it does to fully display the window.
Is there a simple workaround to this? I have using the styles suggested, but still have the issue.
Thanks!
You can throttle the window closing (i.e. allow it to be fully shown before closing it), or stop the window animations.
All the best,Alex Gyoshev
the Telerik team