From 49e4ffbeb0294c58fd6695724a1fdf891560209d Mon Sep 17 00:00:00 2001 From: cahrens Date: Tue, 22 Jul 2014 17:20:41 -0400 Subject: [PATCH] Work around for JQuery sortable bug (placeholder smaller than component). STUD-1967 --- cms/static/js/views/container.js | 6 ++++++ common/test/acceptance/tests/test_studio_container.py | 1 - 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/cms/static/js/views/container.js b/cms/static/js/views/container.js index a49b9660d4..60f38afaf4 100644 --- a/cms/static/js/views/container.js +++ b/cms/static/js/views/container.js @@ -20,6 +20,12 @@ define(["jquery", "underscore", "js/views/xblock", "js/utils/module", "gettext", reorderableContainer.sortable({ handle: '.drag-handle', + start: function (event, ui) { + // Necessary because of an open bug in JQuery sortable. + // http://bugs.jqueryui.com/ticket/4990 + reorderableContainer.sortable('refreshPositions'); + }, + stop: function (event, ui) { var saving, hideSaving, removeFromParent; diff --git a/common/test/acceptance/tests/test_studio_container.py b/common/test/acceptance/tests/test_studio_container.py index f785d858a4..8a080f4799 100644 --- a/common/test/acceptance/tests/test_studio_container.py +++ b/common/test/acceptance/tests/test_studio_container.py @@ -160,7 +160,6 @@ class DragAndDropTest(NestedVerticalTest): expected_ordering ) - @skip("Sporadically drags outside of the Group.") def test_reorder_in_group(self): """ Drag Group A Item 2 before Group A Item 1.