smugmug/yui-gallery — pull request #22 by bwg (2013-06-19 17:43:22+00:00)
Title: Make sure to traverse children of endContainer when endOffset > 0

The children of an endContainer were not being traversed in certain cases.

consider the markup:

````html
lorem ipsum
```

with a range specified as:

```javascript
var range = new Y.Range();
range.startNode(Y.one('b'));
range.endNode(Y.one('b'), 2);
```
traversing the range would result in:
```

#text lorem

```
the text node `ipsum` would never get traversed, even though the offset points to the 2nd child of ``; the `` element.

I think *technically* this is the correct behavior, but it doesn't feel right. I think the expected behavior would be to traverse the children of the node the endOffset points to