angular-drag-and-drop-lists icon indicating copy to clipboard operation
angular-drag-and-drop-lists copied to clipboard

"Uncaught TypeError: Cannot set property 'effectAllowed' of undefined" when attempting to drag

Open dsauerbrun opened this issue 7 years ago • 2 comments

<ul dnd-list="models.lists.A"> <li ng-repeat="item in models.lists.A" dnd-draggable="item" dnd-moved="list.splice($index, 1)" dnd-effect-allowed="move" dnd-selected="models.selected = item" ng-class="{'selected': models.selected === item}" > {{item.label}} </li> </ul>

$scope.models = { selected: null, lists: {"A": [], "B": []} }; // Generate initial model for (var i = 1; i <= 3; ++i) { $scope.models.lists.A.push({label: "Item A" + i}); $scope.models.lists.B.push({label: "Item B" + i}); }

That is my js and html... pretty much copied it straight out of the basic demo. list A is displayed just fine, but once I click and hold on an item, I get a ton of console logs with this error: "Uncaught TypeError: Cannot set property 'effectAllowed' of undefined"

Any ideas?

screen shot 2017-03-14 at 10 04 26 am

dsauerbrun avatar Mar 14 '17 16:03 dsauerbrun

In my case same issue was caused by conflict with another drag&drop library (jquery.event.drag, which hijacks drag events)

Malczewski avatar Feb 22 '18 16:02 Malczewski

I am having same conflict issue,...is there a way to fix this problem?

JavaaPassion avatar Jun 20 '18 03:06 JavaaPassion