From c7bec85cfa7711bb2612278eb980d0d14dade3b9 Mon Sep 17 00:00:00 2001 From: Mike Sherov Date: Sun, 24 Aug 2014 07:19:38 -0400 Subject: [PATCH] Draggable: append divs to iframe parent for iframefix This allows the blocking div to move with the iframe in most situations, whereas appending to the body wouldn't. Fixes #9671 --- tests/unit/draggable/draggable_options.js | 42 +++++++++++++++++++++++ ui/draggable.js | 35 ++++++++++++------- 2 files changed, 64 insertions(+), 13 deletions(-) diff --git a/tests/unit/draggable/draggable_options.js b/tests/unit/draggable/draggable_options.js index f724decbc..46b80608c 100644 --- a/tests/unit/draggable/draggable_options.js +++ b/tests/unit/draggable/draggable_options.js @@ -1334,4 +1334,46 @@ test( "zIndex, default, switching after initialization", function() { }); +test( "iframeFix", function() { + expect( 5 ); + + var element = $( "
" ).appendTo( "#qunit-fixture" ).draggable({ iframeFix: true }), + element2 = $( "
" ).appendTo( "#qunit-fixture" ).draggable({ iframeFix: ".iframe" }), + iframe = $( "" ) + .append( "