github/task-lists-element

Anchor tag in the markup corrupts the position calculations.

chanakyabhardwajj opened this issue · 0 comments

Steps to reproduce

  • Modify the index.html file in the example folder as shown below:
...
    <task-lists sortable>
      <ul class="contains-task-list">
        <a name="anchor" />    <!-- This is the change -->   
        <li class="task-list-item">
          <label>
            <input type="checkbox" class="task-list-item-checkbox" />
            Hubot
          </label>
        </li>
        <li class="task-list-item">
          <label>
            <input type="checkbox" class="task-list-item-checkbox" />
            Bender
          </label>
        </li>
      </ul>
    </task-lists>
...
  • Check/uncheck the checkboxes on the top. The item position is reported as -1.

Screenshot 2021-07-29 at 10 45 11