vue-fragment icon indicating copy to clipboard operation
vue-fragment copied to clipboard

freezing nextSibling can cause infinite loops in code that is traversing children

Open mdellanoce opened this issue 1 year ago • 0 comments

https://github.com/Thunberg087/vue-fragment/blob/master/src/index.js#L57:L63

The expectation is that nextSibling returns null when there is no next sibling. vue-fragment appears to make nextSibling return the parent's first child when there is no next sibling. This affects code that traverses children like the following in Sizzle:

https://github.com/jquery/sizzle/blob/main/src/sizzle.js#L1257

I found a StackOverflow post where someone had the same issue several years ago: https://stackoverflow.com/questions/73033979/element-nextsibling-returns-first-sibling

mdellanoce avatar May 17 '23 17:05 mdellanoce