diff --git a/content/treestyletab/treestyletab.js b/content/treestyletab/treestyletab.js index f2993ed0..1b249953 100644 --- a/content/treestyletab/treestyletab.js +++ b/content/treestyletab/treestyletab.js @@ -1965,7 +1965,7 @@ catch(e) { if (startCount < allLinksCount) { var firstNode = this.evaluateXPath( 'descendant-or-self::node()[not(child::node()) and not(preceding-sibling::node())]', - linksResult.snapshotItem(startCount), + linksResult.snapshotItem(allLinksCount-1), XPathResult.FIRST_ORDERED_NODE_TYPE ).singleNodeValue; contentRange.selectNodeContents(firstNode); diff --git a/tests/fixtures/frameTest.html b/tests/fixtures/frameTest.html index 8ae74298..10941b4e 100644 --- a/tests/fixtures/frameTest.html +++ b/tests/fixtures/frameTest.html @@ -4,8 +4,9 @@