From 077987876bbd01b8b48a72b3573694fafaa44d39 Mon Sep 17 00:00:00 2001 From: Elijah Manor Date: Tue, 24 Jul 2012 14:34:14 -0400 Subject: [PATCH] Fix #12132. IE10 dislikes detached object elements. Close gh-870. --- src/manipulation.js | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/manipulation.js b/src/manipulation.js index d118529d4..212eaf6bb 100644 --- a/src/manipulation.js +++ b/src/manipulation.js @@ -436,11 +436,12 @@ function cloneFixAttributes( src, dest ) { nodeName = dest.nodeName.toLowerCase(); - // IE6-8 fail to clone children inside object elements that use - // the proprietary classid attribute value (rather than the type - // attribute) to identify the type of content to display if ( nodeName === "object" ) { - dest.outerHTML = src.outerHTML; + // IE6-10 improperly clones children of object elements using classid. + // IE10 throws NoModificationAllowedError if parent is null, #12132. + if ( dest.parentNode ) { + dest.outerHTML = src.outerHTML; + } // This path appears unavoidable for IE9. When cloning an object // element in IE9, the outerHTML strategy above is not sufficient. -- 2.39.5