jQuery UI Widgets Forums Plugins Validator, Drag & Drop, Sortable Dragging from Scrolling Div

This topic contains 1 reply, has 2 voices, and was last updated by  Dimitar 10 years, 3 months ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • Dragging from Scrolling Div #61447

    wattmaster
    Participant

    I’m trying to drag an item contained in scrollable div (overflow:auto) to another div outside the scrollable div. When dragging the element to the target div it disappears once the mouse is outside the bounds of the scrollable div.

    Any assistance would be appreciated.

    Dragging from Scrolling Div #61451

    Dimitar
    Participant

    Hello wattmaster,

    If you set the draggable element’s feedback property to “original”, this behaviour will not occur, e.g.:

    <!DOCTYPE html>
    <html lang="en">
    <head>
        <link rel="stylesheet" href="../../jqwidgets/styles/jqx.base.css" type="text/css" />
        <script type="text/javascript" src="../../scripts/jquery-1.11.1.min.js"></script>
        <script type="text/javascript" src="../../jqwidgets/jqxcore.js"></script>
        <script type="text/javascript" src="../../jqwidgets/jqxdragdrop.js"></script>
        <script type="text/javascript">
            $(document).ready(function () {
                $("#element").jqxDragDrop({ feedback: "original" });
            });
        </script>
    </head>
    <body class='default'>
        <div style="overflow: auto; width: 200px; height: 200px; background-color: Green;">
            <div style="width: 50px; height: 50px; border: 1px solid #A67E3A; background-color: #FFC663;"
                id="element">
                <div style="margin-left: 3px; margin-top: 20px; font-size: 10px; font-family: Verdana;">
                    Drag me</div>
            </div>
        </div>
    </body>
    </html>

    Best Regards,
    Dimitar

    jQWidgets team
    http://www.jqwidgets.com/

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.