luckylooke / dragular

Angular drag and drop based on dragula.js. Visit
http://luckylooke.github.io/dragular/
MIT License
209 stars 67 forks source link

Items can be moved to the end of container even if options.accepts returns false #136

Closed bikutaa closed 7 years ago

bikutaa commented 7 years ago

Seems like an item can be moved to the end of a container even if options.accepts returns false.

e.g. Items should be not able to be moved anywhere with:

$scope.dragularOptions = {
  accepts: function() {
    return false;
  }
};

But it can be moved to the last position.

Example link: http://jsfiddle.net/bikutaa/21k4hyzL

luckylooke commented 7 years ago

Thanks for reporting and reproducing the issue, I will fix it soon.

bikutaa commented 7 years ago

Awesome, thanks for the quick reply. Looking forward to your fix, need it for a big project.

luckylooke commented 7 years ago

Fixed in latest version 4.4.1, here is fiddle with fix http://jsfiddle.net/21k4hyzL/4/ Thanks for cooperation ;)