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

Window does not seem to center correctly in IE and FireFox 3.6

10 Answers 234 Views
Window
This is a migrated thread and some comments may be shown as answers.
Seven Spikes
Top achievements
Rank 1
Seven Spikes asked on 17 Jan 2012, 12:22 PM
Hi,

I am using the kendoUI window with the following code:

var window = $(".productAddedToCartModalDialog").kendoWindow({
                draggable: false,
                resizable: false,
                width: "300px",
                height: "100px",
                title: "Shopping Cart Notification",
                modal: true,
                actions: ["Close"],
                visible: false
            }).data("kendoWindow");

window.center();
window.open();

However in IE 7 and 8 as well as Firefox 3.6, the window is centered on the current view port only the first time it is open. When I scroll for example further down the page and trigger the action which executes the code above, the window, just shows in the place it was shown before, which is somewhere up the page, where the user cannot see it.
I tested this in Chrome and Firefox 8 and it works fine. Firefox 3.6 does not bother me as much as the IE situation.
Is there a workaround for this problem.

Thanks!

10 Answers, 1 is accepted

Sort by
0
Alex Gyoshev
Telerik team
answered on 18 Jan 2012, 02:09 PM
This appears to be a bug with the animation. We are currently investigating it and will follow up with a solution. Until then, you can set the animation: false configuration and the window should behave properly.

All the best,
Alex Gyoshev
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Alex Gyoshev
Telerik team
answered on 18 Jan 2012, 02:18 PM
As it turns out, the problem is a bit bigger than expected. It would take us some time to resolve, and we'll strive to do so till the service pack. You can use the following configuration to use only the fadein/out animation and work-around it.

animation: {
    open: {
        effects: { fadeIn: {} }, duration: 350, show: true
    },
    close: {
        effects: { fadeOut: {} }, duration: 350, hide: true
    }
}


Greetings,
Alex Gyoshev
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Seven Spikes
Top achievements
Rank 1
answered on 30 Jan 2012, 09:47 PM
Hi,

Thanks for the answer!
Actually we tried the work around and it did not work. However you did point us in the right direction.
Setting the animation to false does the trick.
Anyway, it is a small problem.

One more thing... your Kendo UI just rocks!
0
Kamen Bundev
Telerik team
answered on 06 Feb 2012, 10:12 AM
Hi,

The centering issue has been fixed for the upcoming service pack.

Kind regards,
Kamen Bundev
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Tom
Top achievements
Rank 1
answered on 18 May 2012, 09:05 PM
So when is the next release with the center bug fixed?
0
Kamen Bundev
Telerik team
answered on 19 May 2012, 07:08 AM
Hi Tom,

The commercial service pack was released on 15 May. The next major release beta is planned around the end of May.

Regards,
Kamen Bundev
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Andre
Top achievements
Rank 1
answered on 22 May 2012, 11:56 AM
I have downloaded the latest trial version and it does not centre for me. Either.  No matter which browser I use, any ideas?

My code is : 
 openWindow = function(url,grid) {
        var winlocation = url;
             var wnd = $("#window").data("kendoWindow");      
             if(!wnd) {
                 // Initialise window
                 var wnd = $("#window").kendoWindow({
                     actions: ["Maximize", "Close"],
                     draggable: true,       
                     modal: true,
                     animation:false,
                     resizable: true,
                     title: "Edit Window",
                     content: winlocation
              }).data("kendoWindow");
             } else {
            wnd.refresh(winlocation).open();
             }
             wnd.center();
    }

0
Dimo
Telerik team
answered on 22 May 2012, 12:05 PM
Hi Andre,

If the Window's size depends on its content, you should center() it in the refresh event.
On a side note, you can use  wnd.center().open();

Greetings,
Dimo
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
S
Top achievements
Rank 1
answered on 22 Aug 2012, 05:14 PM
Hi,

I have similar issue, but for me it appears that the window only center to the height of the page, not the view port of the browser. So, if i have a long page, the kendo window won't show up on my screen. Instead, it will center to the page which users have to scroll down to see it.

Is this bug or something else? Any way around this?

Thanks!
0
Dimo
Telerik team
answered on 23 Aug 2012, 06:19 AM
Hi Suhendra,

This sounds like an issue that we have fixed a long time ago, are you using the latest version?

http://jsfiddle.net/dimodi/QrgyP/

Regards,
Dimo
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Tags
Window
Asked by
Seven Spikes
Top achievements
Rank 1
Answers by
Alex Gyoshev
Telerik team
Seven Spikes
Top achievements
Rank 1
Kamen Bundev
Telerik team
Tom
Top achievements
Rank 1
Andre
Top achievements
Rank 1
Dimo
Telerik team
S
Top achievements
Rank 1
Share this question
or