diff --git a/ember-drag-drop/src/components/draggable-object.js b/ember-drag-drop/src/components/draggable-object.js index 42edcf6..a5f4b0f 100644 --- a/ember-drag-drop/src/components/draggable-object.js +++ b/ember-drag-drop/src/components/draggable-object.js @@ -137,9 +137,10 @@ export default Component.extend({ if(this.get('dragEndAction')) { this.get('dragEndAction')(obj, event); } - if (this.get('dragHandle')) { - this.set('dragReady', false); - } + + // This prevents the situation where, when you release an element and the mouse cursor is still in the DOM + // that triggers the item's draggable state, you can move the item again without having to move the mouse out and back over the item. + this.set('dragReady', false); }, drag(event) { diff --git a/ember-drag-drop/src/services/drag-coordinator.js b/ember-drag-drop/src/services/drag-coordinator.js index e1bfede..42834ed 100644 --- a/ember-drag-drop/src/services/drag-coordinator.js +++ b/ember-drag-drop/src/services/drag-coordinator.js @@ -77,7 +77,7 @@ export default Service.extend({ draggingOver(event, emberObject) { const currentOffsetItem = this.get('currentOffsetItem'); const pos = this.relativeClientPosition(emberObject.element, event); - const hasSameSortingScope = this.get('currentDragItem.sortingScope') === emberObject.get('sortingScope'); + const hasSameSortingScope = this.get('currentDragItem').get('sortingScope') === emberObject.get('sortingScope'); let moveDirections = []; if (!this.get('lastEvent')) {