New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

insertAfter() and after() throw exception #103

Closed
tedbeer opened this Issue Nov 3, 2011 · 3 comments

Comments

Projects
None yet
2 participants
@tedbeer

tedbeer commented Nov 3, 2011

test fragment (you can run it in the sandbox):

<ul xmlns="http://www.w3.org/1999/xhtml"><li>aaa</li><li>bbb</li></ul>

the following code should leave nodes at the same place but it throws exception:

var items = ample.query('ul')[0].childNodes; ample.query(items[1]).insertAfter(items[0])

using after also fails:

var items = ample.query('ul')[0].childNodes; ample.query(items[0]).after(items[1])

Similar code using before()/insertBefore() works correctly.

@tedbeer

This comment has been minimized.

Show comment
Hide comment
@tedbeer

tedbeer Nov 3, 2011

ample.query().prependTo() also fails if an element is already in place

tedbeer commented Nov 3, 2011

ample.query().prependTo() also fails if an element is already in place

@ilinsky

This comment has been minimized.

Show comment
Hide comment
@ilinsky

ilinsky Nov 6, 2011

Member

Please provide test script for prependTo

Member

ilinsky commented Nov 6, 2011

Please provide test script for prependTo

@ilinsky

This comment has been minimized.

Show comment
Hide comment
@ilinsky

ilinsky Nov 6, 2011

Member

Fixed in commit f04c63a

Member

ilinsky commented Nov 6, 2011

Fixed in commit f04c63a

@ilinsky ilinsky closed this Nov 6, 2011

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment