angular-sortable-view
angular-sortable-view copied to clipboard
`sv-handle-disable` is evaluated on the incorrect element.
trafficstars
If you've a custom handle, with multiple childs on it, e.target can be any of the child but not necessary the one withsv-handle or sv-handle-disabled.
the fix:
var svHandleDisabled = $attrs.svHandleDisabled ? $parse($attrs.svHandleDisabled)($scope) : false;
if (svHandleDisabled) return;
@Fedik that fix didn't work for me but it led me to what did:
//replace
var svHandleDisabledAttr = e.target.attributes['sv-handle-disabled'];
//with
var svHandleDisabledAttr = e.currentTarget.attributes['sv-handle-disabled'];