diff --git a/src/utils/Sorter.js b/src/utils/Sorter.js index de1940c38..dc6c5e26f 100644 --- a/src/utils/Sorter.js +++ b/src/utils/Sorter.js @@ -558,7 +558,8 @@ export default Backbone.View.extend({ const $parent = parent && $(parent); if (style.overflow && style.overflow !== 'visible') return; - if ($el.css('float') && $el.css('float') !== 'none') return; + const propFloat = $el.css('float'); + if (propFloat && propFloat !== 'none') return; if ( $parent && $parent.css('display') == 'flex' && @@ -623,7 +624,7 @@ export default Backbone.View.extend({ // Check if the target could accept the source let droppable = trgModel.get('droppable'); if (typeof droppable === 'function') { - let res = droppable(src, trg); + let res = droppable(srcModel, trgModel); result.droppable = res; result.dropInfo = res; droppable = res; diff --git a/test/specs/utils/Sorter.js b/test/specs/utils/Sorter.js index 21a85c153..d084b8ba6 100644 --- a/test/specs/utils/Sorter.js +++ b/test/specs/utils/Sorter.js @@ -436,15 +436,15 @@ describe('Sorter', () => { }); }); - describe.only('Valid Target with components', () => { + describe('Valid Target with components', () => { var parentModel; var parentView; var sorter; beforeEach(() => { parentModel = new Component({ - droppable: (src, target) => { - if (src.className === 'canDrop') { + droppable: (srcModel, trgModel) => { + if (srcModel.getEl().className === 'canDrop') { return true; } return false;