angular-sortable-view icon indicating copy to clipboard operation
angular-sortable-view copied to clipboard

`sv-handle-disable` is evaluated on the incorrect element.

Open jkutianski opened this issue 7 years ago • 2 comments
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.

jkutianski avatar Mar 10 '18 23:03 jkutianski

the fix:

var svHandleDisabled = $attrs.svHandleDisabled ? $parse($attrs.svHandleDisabled)($scope) : false;
if (svHandleDisabled) return;

Fedik avatar Mar 23 '19 11:03 Fedik

@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'];

shennero avatar Sep 11 '20 12:09 shennero