From 9ee1742254d0a4723fd6d5eb894567747b7847f7 Mon Sep 17 00:00:00 2001 From: CBenni Date: Sat, 14 Nov 2015 15:55:08 +0100 Subject: [PATCH 1/2] Sortable: Improved compatibility with flexbox Added detection for flexbox into _isFloating, which improves the detection of where an item is moved to. See https://github.com/CBenni/jquery-ui/commit/3526e7f3e2a5f18c91591874d50827d1ad9fa471 In reference to jquery-ui bug id #9344 (http://bugs.jqueryui.com/ticket/9344), which is reproducable within angular-ui/ui-sortable as well. --- src/sortable.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sortable.js b/src/sortable.js index 14c2679..a25bb3b 100644 --- a/src/sortable.js +++ b/src/sortable.js @@ -44,7 +44,7 @@ angular.module('ui.sortable', []) // thanks jquery-ui function isFloating (item) { - return (/left|right/).test(item.css('float')) || (/inline|table-cell/).test(item.css('display')); + return (/left|right/).test(item.css('float')) || (/inline|table-cell/).test(item.css('display')) || ( /flex/ ).test( this.element.css( "display" ) ); } function getElementScope(elementScopes, element) { From 52c5040c48b666cbc5ce0908a1938aaaa0baee05 Mon Sep 17 00:00:00 2001 From: CBenni Date: Sat, 14 Nov 2015 16:06:07 +0100 Subject: [PATCH 2/2] Fixed quotes --- src/sortable.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sortable.js b/src/sortable.js index a25bb3b..f4da0c0 100644 --- a/src/sortable.js +++ b/src/sortable.js @@ -44,7 +44,7 @@ angular.module('ui.sortable', []) // thanks jquery-ui function isFloating (item) { - return (/left|right/).test(item.css('float')) || (/inline|table-cell/).test(item.css('display')) || ( /flex/ ).test( this.element.css( "display" ) ); + return (/left|right/).test(item.css('float')) || (/inline|table-cell/).test(item.css('display')) || ( /flex/ ).test( this.element.css( 'display' ) ); } function getElementScope(elementScopes, element) {