Ticket #66 (closed defect: fixed)

Opened 3 years ago

Last modified 2 years ago

Node:: index_in_parent not working correctly

Reported by: tobiaslidskog@… Owned by: ser
Priority: normal Milestone: 3.1.6
Component: DOM Version: 2.7
Severity: normal Keywords:
Cc: Ruby version: 1.8.4
Operating system: All

Description

The documentation for index_in_parent states that "node == node.parent.elements[node.index_in_parent]". This is not true since index_in_parent calls Parent::index, which counts all children, not just elements. The attached test case will show an example of this.

Attachments

node.rb (436 bytes) - added by tobiaslidskog@… 3 years ago.

Change History

Changed 3 years ago by tobiaslidskog@…

Changed 3 years ago by tobiaslidskog@…

oops, left an old comment in the test case.

Changed 2 years ago by ser

  • status changed from new to closed
  • resolution set to fixed

Documentation fixed by changeset:1236

Note: See TracTickets for help on using tickets.