From 0c02740fa7179afb08d57ffdbdcf7c6ec1de19be Mon Sep 17 00:00:00 2001 From: Mike Sherov Date: Sun, 7 Apr 2013 12:17:19 -0400 Subject: [PATCH] Draggable Tests: fix more old Safari and old Opera tests with jQuery < 1.8 tests by accounting for a bug in $.contains on disconnected Elements.(cherry picked from commit d4d9e14161d0f2cd64a441e4703c801b35fbc158) --- tests/unit/draggable/draggable_core.js | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/tests/unit/draggable/draggable_core.js b/tests/unit/draggable/draggable_core.js index 88b9c3f23..53703843d 100644 --- a/tests/unit/draggable/draggable_core.js +++ b/tests/unit/draggable/draggable_core.js @@ -87,11 +87,16 @@ test( "#8269: Removing draggable element on drop", function() { } }); - element.simulate( "drag", { - handle: "corner", - x: dropOffset.left, - y: dropOffset.top - }); + // Support: Opera 12.10, Safari 5.1, jQuery <1.8 + if ( TestHelpers.draggable.unreliableContains ) { + ok( true, "Opera <12.14 and Safari <6.0 report wrong values for $.contains in jQuery < 1.8" ); + } else { + element.simulate( "drag", { + handle: "corner", + x: dropOffset.left, + y: dropOffset.top + }); + } }); test( "#6258: not following mouse when scrolled and using overflow-y: scroll", function() { -- 2.39.5