Skip to content

<div> inside a .sortable-element doesn't work #5

@drhumlen

Description

@drhumlen

If you look at my example, I've placed a <div> inside the sortable, which seems to break everything.
( demo: http://plnkr.co/edit/DfMGxmjCYYxdua8lYSQU?p=preview )

My code:

  <div ng-sortable="items">
    <div class="sortable-element" ng-repeat="item in items">
      <div ng-style="{backgroundColor: item.color}">
        {{item.name}}, {{item.profession}}
      </div>
    </div>
  </div>

The original:

  <div ng-sortable="items">
    <div class="sortable-element" ng-repeat="item in items" ng-style="{backgroundColor: item.color}">
      {{item.name}}, {{item.profession}}
    </div>
  </div>

Having another level of nesting, e.g. a <div>, inside a .sortable-element seems to break it. Do you have any idea why? I want to make a sortable list of more than just plain text. I can try to help (pull-request) if you can point me in a direction. Also, are you able to replicate the error? And lastly, is there a way around this / am I doing something wrong?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions