SitePen/dgrid — pull request #860 by kfranqueiro (2014-02-28 23:42:08+00:00)
Title: Fix #858: Selection: Avoid range confusion involving orphaned nodes

If an update occurs on the row at which a selection range was started, and the user later shift+selects, an infinite loop occurs because Selection wrongly assumes that the element from the starting row is still in the document, when it was actually replaced with a new one. This works around that by detecting if the element is no longer in the document, and grabbing the equivalent element that is in the document instead.