fix region patching

This commit is contained in:
David Greenspan
2012-08-08 14:37:25 -07:00
parent 4ab40534fe
commit f3a66b59f2

View File

@@ -39,7 +39,8 @@ Spark._patch = function(tgtParent, srcParent, tgtBefore, tgtAfter, preservations
DomUtils.elementOrder(lastTgtMatch, tgt) > 0) {
if (pres.type === 'region') {
// preserved region for constant landmark
if (patcher.match(pres.fromStart, pres.newRange.firstNode(), null, true)) {
if (patcher.match(pres.fromStart, pres.newRange.firstNode(),
copyFunc, true)) {
patcher.skipToSiblings(pres.fromEnd, pres.newRange.lastNode());
// without knowing or caring what DOM nodes are in pres.newRange,
// transplant the range data to pres.fromStart and pres.fromEnd