Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"e.index is not a function" for handles in a directive in 1.3.8 #387

Open
peterjhart opened this issue Jul 8, 2017 · 1 comment
Open

Comments

@peterjhart
Copy link

peterjhart commented Jul 8, 2017

ng-sortable throws an error when the as-sortable-item-handle is inside a directive (in my case, with an isolate scope).

The structure is basically:
Parent Template

<div as-sortable="vm.sortableConfig" ng-model="vm.things">
    <my-directive ng-repeat="thing in vm.things track by thing.id" as-sortable-item thing="thing"></my-directive as-sortable-item>
</div>

Directive Template

<div as-sortable-item-handle>
  {{thing.title}}
</div>

The error (I removed file/lines since it's concatenated):

Uncaught TypeError: e.index is not a function
    at Object.dragItem
    at _
    at HTMLDocument.a
    at nt
    at HTMLDocument.n
dragItem
_
a
nt
n

When I revert to 1.3.7, this works. When I upgrade to 1.3.8, I get the error.

Google Chrome, AngularJS 1.6.4

cgx added a commit to Alinto/sogo that referenced this issue Oct 23, 2017
Rollback to version 1.3.7 of ng-sortable until the following buy is
fixed: a5hik/ng-sortable#387
@mikey0000
Copy link

#393

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants