There are many ways to prevent the dragging of an object, but the one that worked for me is
app.directive('preventDrag', function () {
return {
link: function (scope, element, attributes) {
element.on('mousedown', (e) {
e.stopPropagation();
});
}
}
});
I was hoping for more of a library fix, but this isn't too bad.
You could also try
- user-select: none; //css
- onmousedown="return false;"
- ondragstart="return false;"