aboutsummaryrefslogtreecommitdiffstats
path: root/tests/unit/draggable/draggable_core.js
diff options
context:
space:
mode:
Diffstat (limited to 'tests/unit/draggable/draggable_core.js')
-rw-r--r--tests/unit/draggable/draggable_core.js14
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/unit/draggable/draggable_core.js b/tests/unit/draggable/draggable_core.js
index e2dc2a481..232ac6c17 100644
--- a/tests/unit/draggable/draggable_core.js
+++ b/tests/unit/draggable/draggable_core.js
@@ -185,4 +185,18 @@ test( "#5727: draggable from iframe" , function() {
TestHelpers.draggable.shouldMove( draggable1 );
});
+test( "#8399: A draggable should become the active element after you are finished interacting with it, but not before.", function() {
+ expect( 2 );
+
+ var element = $( "<a href='#'>link</a>" ).appendTo( "#qunit-fixture" ).draggable();
+
+ $( document ).one( "mousemove", function() {
+ notStrictEqual( document.activeElement, element.get( 0 ), "moving a draggable anchor did not make it the active element" );
+ });
+
+ TestHelpers.draggable.move( element, 50, 50 );
+
+ strictEqual( document.activeElement, element.get( 0 ), "finishing moving a draggable anchor made it the active element" );
+});
+
})( jQuery );