Window Constraining and Pinning

2 posts, 0 answers
  1. Jesse
    Jesse avatar
    10 posts
    Member since:
    Aug 2018

    Posted 21 Jan 2020 Link to this post

    When using the Kendo Window in JQuery or MVC, you can bypass the constrained area by pinning the window and then attempting to move it. Is this expected behavior?

    You can see an example by going to your online demos, pin the window, then attempt to move it.

    https://demos.telerik.com/kendo-ui/window/constrain-movement

     

    <!DOCTYPE html>
    <html>
    <head>
        <title></title>
        <link rel="stylesheet" href="styles/kendo.common.min.css" />
        <link rel="stylesheet" href="styles/kendo.default.min.css" />
        <link rel="stylesheet" href="styles/kendo.default.mobile.min.css" />
     
        <script src="js/jquery.min.js"></script>
        <script src="js/kendo.all.min.js"></script>
         
     
    </head>
    <body>
    <div id="example">
        <div id="container">
            <div id="window">
                <p>Alvar Aalto is one of the greatest names in modern architecture and design.
                   Glassblowers at the iittala factory still meticulously handcraft the legendary vases
                   that are variations on one theme, fluid organic shapes that let the end user decide the use.
                </p>
            </div>
        </div>
     
        <script>
            $(document).ready(function() {
                $("#window").kendoWindow({
                    width: "300px",
                    height: "200px",
                    draggable: {
                        containment: "#container"
                    },
                    title: "About Alvar Aalto",
                    actions: ["Minimize", "Maximize", "Pin"]
                }).data("kendoWindow").open();
            });
        </script>
     
        <style>
            #container {
                height: 400px;
                width: 600px;
                position: relative;
                border: 1px solid rgba(20,53,80,0.14);
            }
        </style>
    </div>
     
     
    </body>
    </html>
  2. Petar
    Admin
    Petar avatar
    467 posts

    Posted 23 Jan 2020 Link to this post

    Hi Jesse,

    The reported behavior is an expected one. When pinned, the Window component keeps its position fixed inside the browser's window. 

    As you can see in the linked demo, once the Window is unpinned, it moves inside its constraining area. 

    Regards,


    Petar
    Progress Telerik

    Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Back to Top