diff options
author | Mike Sherov <mike.sherov@gmail.com> | 2014-08-22 15:16:41 -0400 |
---|---|---|
committer | Mike Sherov <mike.sherov@gmail.com> | 2014-08-23 15:08:54 -0400 |
commit | 95546c5d045f8055b121f24d3e35468e2a570c1b (patch) | |
tree | 61038aba83e98454e532711a4651ff39b56d04d2 /tests/unit/draggable/draggable.html | |
parent | a62612ce42d4ac95130d0eee47ed6b62e6588515 (diff) | |
download | jquery-ui-95546c5d045f8055b121f24d3e35468e2a570c1b.tar.gz jquery-ui-95546c5d045f8055b121f24d3e35468e2a570c1b.zip |
Draggable: No cloning in connectToSortable and ensure correct position
Draggables now forcefully recalculate their position when dragged out
of a sortable. Sortables now override draggable position when a
draggable is dragged into it. Lastly, no longer remove sortable helper
when dragging a draggable out, which allows us to not use a clone.
Fixes #7734
Fixes #8809
Closes gh-1322
Diffstat (limited to 'tests/unit/draggable/draggable.html')
-rw-r--r-- | tests/unit/draggable/draggable.html | 40 |
1 files changed, 39 insertions, 1 deletions
diff --git a/tests/unit/draggable/draggable.html b/tests/unit/draggable/draggable.html index 8a19fc046..3b4db9921 100644 --- a/tests/unit/draggable/draggable.html +++ b/tests/unit/draggable/draggable.html @@ -46,6 +46,31 @@ #draggable3, #draggable4 { z-index: 100; } + #sortable { + position: relative; + top: 8000px; + left: 10px; + } + #sortable2 { + position: relative; + top: 9000px; + left: 10px; + } + .sortable { + width: 300px; + height: 100px; + padding: 0; + margin: 0; + border: 0; + } + .sortable li { + height: 100px; + padding: 0; + margin: 0; + border: 0; + list-style: none; + display: inline-block; + } </style> <script src="../../../external/qunit/qunit.js"></script> @@ -60,7 +85,8 @@ "ui/mouse.js", "ui/resizable.js", "ui/draggable.js", - "ui/droppable.js" + "ui/droppable.js", + "ui/sortable.js" ] }); </script> @@ -90,6 +116,18 @@ </div> <div style="width: 1px; height: 1000px;"></div> <div style="position: absolute; width: 1px; height: 2000px;"></div> + <ul id="sortable" class="sortable"> + <li>Item 0</li> + <li id="draggableSortable">Item 1</li> + <li>Item 2</li> + <li>Item 3</li> + </ul> + <ul id="sortable2" class="sortable"> + <li id="draggableSortableClone">Item 0</li> + <li>Item 1</li> + <li>Item 2</li> + <li>Item 3</li> + </ul> </div> </body> |