Window resizing issue when in container

5 posts, 0 answers
  1. zhivko.zhelezov
    zhivko.zhelezov avatar
    31 posts
    Member since:
    May 2011

    Posted 18 Feb Link to this post

    Hi, we are developing a component where we use many Kendo UI Window instances. They are all placed in a container that is not the "body" element. This container is relative to other elements and has offsets from the "body".

    When trying to resize a window, the resizing border does not align with the mouse position, it seems to shrink down with the size of the offset from the body.

    Here is a small demo, reproducing the issue: http://jsbin.com/jivemitavi/edit?html,css,js,output

    If you set a 'top' or 'left' on the container, the behavior changes and the window even moves its position when resizing.

    Is there a workaround to this or is there something we're missing?

    Thanks.

     

  2. Ivan Zhekov
    Admin
    Ivan Zhekov avatar
    540 posts

    Posted 23 Feb Link to this post

    Hi, Zhivko.

    The window is meant to be top-level element, ideally not placed inside any container, or if placed, the container should not have padding, border or margins.

    Looking at the code in question: https://github.com/telerik/kendo-ui-core/blob/master/src/kendo.window.js#L1329-L1358, you can see that the new width / height is calculated as the greater of the two distances (document edge, container edge). That's why in the beginning the window is correct in size and then "jumps" to the expected size + the pixels from the container edge to the document edge.

    Is it paramount that the windows are placed inside a container with padding / margin?

    Regards,
    Ivan Zhekov
    Telerik
     
    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. Sysadmins
    Sysadmins avatar
    4 posts
    Member since:
    Jun 2015

    Posted 29 Feb in reply to Ivan Zhekov Link to this post

    Hello Ivan, 

    We are experiencing the same issues when using appendTo and the problem seems to date back 3 years with "promises" that it will be resolved :

    Dimo said:Hello Jeff,

    Sorry about the misuderstanding, now I see what you mean.

    It seems the problem is not trivial to resolve, so I have logged it in our bug tracking system for future fixing. Your Telerik points have been updated.

    Regards,
    Dimo 
    Telerik



    These bugs make the appendTo option useless although a great and much needed feature for rich dynamic interfaces.
    Example

     
    Checking the example below you will also see another two bugs:
    1. Trying to drag "window2" while scrolled to the bottom/less corner of the container, the offset calculation makes the window jump out of view immediately to the container's top/left relative position and not that of the scrolled offset
    2. Closing down "window2" and trying to move "window1", makes the scrolling disappear immediately and moves window to top/left most side of the container

    Is there any ETA or possible workaround for these problems? In our case we have DevCraft Complete license, would it be the same to use a modified version of the open source kendo core, fixing the window with appendTo issues?

    Regards,
    Kypros.

  5. zhivko.zhelezov
    zhivko.zhelezov avatar
    31 posts
    Member since:
    May 2011

    Posted 02 Mar Link to this post

    Hi Ivan,

    Yes, it is necessary for us to use the windows in this specific context. We are experimenting with other options such as jQuery Dialog.

    Regards

  6. Dimo
    Admin
    Dimo avatar
    8333 posts

    Posted 02 Mar Link to this post

    Hello,

    I confirm that the discussed problem is a known one, however, it has not made it in our development plans due to low priority. Sorry about that.

    On the other hand, in order to address Angular-related issues, we intend to research the possibility to use only the "appendTo" mode of the widget in the new Angular 2 - compliant Kendo UI version. If successful, this will resolve the current limitation.

    Regards,
    Dimo
    Telerik
    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