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

11 posts, 0 answers
  1. Seven Spikes
    Seven Spikes avatar
    6 posts
    Member since:
    Oct 2009

    Posted 17 Jan 2012 Link to this post

    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!
  2. Alex Gyoshev
    Admin
    Alex Gyoshev avatar
    2500 posts

    Posted 18 Jan 2012 Link to this post

    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!
  3. Kendo UI is VS 2017 Ready
  4. Alex Gyoshev
    Admin
    Alex Gyoshev avatar
    2500 posts

    Posted 18 Jan 2012 Link to this post

    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!
  5. Seven Spikes
    Seven Spikes avatar
    6 posts
    Member since:
    Oct 2009

    Posted 30 Jan 2012 Link to this post

    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!
  6. Kamen Bundev
    Admin
    Kamen Bundev avatar
    1532 posts

    Posted 06 Feb 2012 Link to this post

    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!
  7. Tom
    Tom avatar
    2 posts
    Member since:
    Sep 2010

    Posted 18 May 2012 Link to this post

    So when is the next release with the center bug fixed?
  8. Kamen Bundev
    Admin
    Kamen Bundev avatar
    1532 posts

    Posted 19 May 2012 Link to this post

    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!
  9. Andre
    Andre avatar
    9 posts
    Member since:
    Feb 2012

    Posted 22 May 2012 Link to this post

    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();
        }

  10. Dimo
    Admin
    Dimo avatar
    8333 posts

    Posted 22 May 2012 Link to this post

    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!
  11. S
    S avatar
    15 posts
    Member since:
    Apr 2012

    Posted 22 Aug 2012 Link to this post

    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!
  12. Dimo
    Admin
    Dimo avatar
    8333 posts

    Posted 23 Aug 2012 Link to this post

    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!
Back to Top
Kendo UI is VS 2017 Ready