tbranyen/backbone.layoutmanager — pull request #287 by STRML (2013-02-11 02:40:51+00:00)
Title: Fix for #286: List items (inserted views) with el:false are rerendered improperly.

This fixes #286.

If an ItemView is a member of a ListView and the ItemView has `el:false`, if the ItemView rerenders itself it will actually be cloned and appended to the end of the list.

This is due to a check in render.resolve() (line 243) that checks if the el already exists in the parent. Because of the nature of Backbone's `setElement` the element is detached from the DOM during that check. the contains call returns false and thus the el is reappended.

[JSFiddle with current version of Backbone.LayoutManager (0.8.3)](http://jsfiddle.net/Sottilde/DApE7/)

[JSFiddle with fix](http://jsfiddle.net/Sottilde/DApE7/7/)