Ensure innerHTML of src/dest clone nodes is correctly set. Fixes #10324

Signed-off-by: 's avatarRick Waldron waldron.rick@gmail.com <waldron.rick@gmail.com>
parent 379a1370
...@@ -435,6 +435,13 @@ function cloneFixAttributes( src, dest ) { ...@@ -435,6 +435,13 @@ function cloneFixAttributes( src, dest ) {
if ( nodeName === "object" ) { if ( nodeName === "object" ) {
dest.outerHTML = src.outerHTML; dest.outerHTML = src.outerHTML;
// This path appears unavoidable for IE9. When cloning an object
// element in IE9, the outerHTML strategy above is not sufficient.
// If the src has innerHTML and the destination does not,
// copy the src.innerHTML into the dest.innerHTML. #10324
if ( jQuery.support.html5Clone && (src.innerHTML && !jQuery.trim(dest.innerHTML)) ) {
dest.innerHTML = src.innerHTML;
}
} else if ( nodeName === "input" && (src.type === "checkbox" || src.type === "radio") ) { } else if ( nodeName === "input" && (src.type === "checkbox" || src.type === "radio") ) {
// IE6-8 fails to persist the checked state of a cloned checkbox // IE6-8 fails to persist the checked state of a cloned checkbox
// or radio button. Worse, IE6-7 fail to give the cloned element // or radio button. Worse, IE6-7 fail to give the cloned element
......
...@@ -135,6 +135,7 @@ ...@@ -135,6 +135,7 @@
<param name="p1" value="x1" /> <param name="p1" value="x1" />
<param name="p2" value="x2" /> <param name="p2" value="x2" />
</object> </object>
<object id="object2"><param name="test" value="test"></param></object>​
<span id="台北Táiběi"></span> <span id="台北Táiběi"></span>
<span id="台北" lang="中文"></span> <span id="台北" lang="中文"></span>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment