aboutsummaryrefslogtreecommitdiffstats
path: root/tests/unit/draggable
diff options
context:
space:
mode:
Diffstat (limited to 'tests/unit/draggable')
-rw-r--r--tests/unit/draggable/core.js23
-rw-r--r--tests/unit/draggable/draggable.html24
-rw-r--r--tests/unit/draggable/options.js2
3 files changed, 37 insertions, 12 deletions
diff --git a/tests/unit/draggable/core.js b/tests/unit/draggable/core.js
index 8bc751e0e..61d8503ea 100644
--- a/tests/unit/draggable/core.js
+++ b/tests/unit/draggable/core.js
@@ -345,4 +345,27 @@ test( "ui-draggable-handle managed correctly in nested draggables", function( as
assert.hasClasses( child, "ui-draggable-handle", "child retains class name on destroy" );
} );
+// Support: IE 8 only
+// IE 8 implements DOM Level 2 Events which only has events bubble up to the document.
+// We skip this test since it would be impossible for it to pass in such an environment.
+QUnit[ document.documentMode === 8 ? "skip" : "test" ](
+ "does not stop propagation to window",
+ function( assert ) {
+ expect( 1 );
+ var element = $( "#draggable1" ).draggable();
+
+ var handler = function() {
+ assert.ok( true, "mouseup propagates to window" );
+ };
+ $( window ).on( "mouseup", handler );
+
+ element.simulate( "drag", {
+ dx: 10,
+ dy: 10
+ } );
+
+ $( window ).off( "mouseup", handler );
+ }
+);
+
} );
diff --git a/tests/unit/draggable/draggable.html b/tests/unit/draggable/draggable.html
index 0971b2325..53468a3a9 100644
--- a/tests/unit/draggable/draggable.html
+++ b/tests/unit/draggable/draggable.html
@@ -48,7 +48,7 @@
}
.sortable {
position: relative;
- top: 8000px;
+ top: 800px;
left: 10px;
width: 300px;
padding: 0;
@@ -81,17 +81,17 @@
<div style="width: 1px; height: 1000px;"></div>
<div style="position: absolute; width: 1px; height: 2000px;"></div>
<ul id="sortable" class="sortable">
- <li id="draggableSortable">Item 0</li>
- <li id="draggableSortable2">Item 1</li>
- <li>Item 2</li>
- <li>Item 3</li>
- </ul>
- <ul id="sortable2" class="sortable">
- <li id="draggableSortableClone" class="sortable2Item">Item 0</li>
- <li>Item 1</li>
- <li>Item 2</li>
- <li>Item 3</li>
- </ul>
+ <li id="draggableSortable">Item 0</li>
+ <li id="draggableSortable2">Item 1</li>
+ <li>Item 2</li>
+ <li>Item 3</li>
+ </ul>
+ <ul id="sortable2" class="sortable">
+ <li id="draggableSortableClone" class="sortable2Item">Item 0</li>
+ <li>Item 1</li>
+ <li>Item 2</li>
+ <li>Item 3</li>
+ </ul>
</div>
</body>
diff --git a/tests/unit/draggable/options.js b/tests/unit/draggable/options.js
index 2c8de5a0a..2aa5a1ae1 100644
--- a/tests/unit/draggable/options.js
+++ b/tests/unit/draggable/options.js
@@ -6,6 +6,8 @@ define( [
"ui/widgets/sortable"
], function( $, testHelper ) {
+module( "draggable: options" );
+
// TODO: This doesn't actually test whether append happened, possibly remove
test( "{ appendTo: 'parent' }, default, no clone", function() {
expect( 4 );