Drag and Drop issue with pointer/cursor movement

6 posts, 0 answers
  1. Brian
    Brian avatar
    10 posts
    Member since:
    Jul 2008

    Posted 23 Feb 2010 Link to this post

    We have a project using the rad dock controls and when I drag a dock from one zone to another it is possible to get the dock to lose its connection to the pointer.   To do this I basically just move the dock down below the scrollbar line then move it back up.  My mouse indicator becomes a pointer when this happens instead of the standard cross pointer you see when moving a dock.  

    has anyone else experienced this or know of a fix for it.


    I performed a pretty complete search trying to look for anyone else having this issue and was unable to find anything.  
  2. Pero
    Admin
    Pero avatar
    1156 posts

    Posted 25 Feb 2010 Link to this post

    Hello Brian,

    This is expected behavior, because the dock scrolls the page (scrollbars appear on the browser window) when it goes near the browser window bounds. You can avoid this by making the dock not scroll the page when it's dragged near the browser window bounds by invoking the following client script for every dock on the page:

    <%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <head id="Head1" runat="server">
        <title></title>
        <script type="text/javascript">
            function DockInit(dock, args)
            {
                dock._resizeExtender._autoScrollEnabled = false;
            
        </script>
    </head>
    <body>
        <form id="form1" runat="server">
        <div>
            <asp:ScriptManager ID="scriptmanager1" runat="server" />
            <telerik:RadDockLayout runat="server" EnableViewState="false" StoreLayoutInViewState="false"
                ID="RadDockLayout1">
                <telerik:RadDockZone runat="server" Skin="" ID="RadDockZone1" Width="400px">
                    <telerik:RadDock runat="server" ID="raddock_1" OnClientInitialize="DockInit">
                        <ContentTemplate>
                            <br />
                            <br />
                            <br />
                            <br />
                            Content
                            <br />
                            <br />
                            <br />
                            <br />
                            <br />
                        </ContentTemplate>
                    </telerik:RadDock>
                    <telerik:RadDock runat="server" ID="RadDock1" OnClientInitialize="DockInit">
                        <ContentTemplate>
                            <br />
                            <br />
                            <br />
                            <br />
                            Content
                            <br />
                            <br />
                            <br />
                            <br />
                            <br />
                        </ContentTemplate>
                    </telerik:RadDock>
                </telerik:RadDockZone>
            </telerik:RadDockLayout>
        </div>
        </form>
    </body>
    </html>



    Kind regards,
    Pero
    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.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Sarae
    Sarae avatar
    2 posts
    Member since:
    Nov 2011

    Posted 20 Jun 2013 Link to this post

    I am having a similar issue. I have a page with two vertical zones and several docks in each zone, but zone 2 is shorter than zone 1. The content is long enough that the page has a scrollbar.  I want to be able to drag the dock at the bottom of the zone 1 up to the top of the zone 2, which means I need to scroll to the top with the dock still "attached" to the cursor. Is this possible? Currently, the dock separates from the cursor as soon i leave zone 1 and the page content starts scrolling.
  5. Slav
    Admin
    Slav avatar
    1355 posts

    Posted 25 Jun 2013 Link to this post

    Hi Sarae,

    By default the RadDock should not be separated from the cursor once it leaves a RadDockZone. Please check whether there is a custom script that modifies the behavior of the dock controls and remove it, if such exists.

    If this is not the case, please elaborate on your scenario so that I can help you accordingly because currently I am mostly guessing as to what your setup is. You can open a support ticket and send a simple, fully runnable page that isolates the problem so that I can inspect it locally and provide an according solution.

    Regards,
    Slav
    Telerik
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
  6. Sarae
    Sarae avatar
    2 posts
    Member since:
    Nov 2011

    Posted 25 Jun 2013 Link to this post

    Hi Slav,
    Thank you for your reply.  There are no scripts that modify the behavior of the dock.  I will go ahead and open up a support ticket with additional info.
  7. Slav
    Admin
    Slav avatar
    1355 posts

    Posted 28 Jun 2013 Link to this post

    Hello Sarae,

    I will post the answer from your support ticket here as well, so that it can be of use to others that encounter the described behavior

    Indeed, the dragged dock is moved outside the cursor when you have a dock zone or a container with overflow and the scrollbar is dragged to the bottom. This behavior can be avoided by applying the solution from the Knowledge Base article How to persist the scrollbar position of a vertical RadDockZone.

    A similar effect is examined when moving with the cursor while using the scroll wheel of the mouse. This feature is not supported by the dock control and it is logged for implementation.

    Regards,
    Slav
    Telerik
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017