Fix #11359: preserve contents for cloned scripts

This commit is contained in:
Richard Gibson
2012-02-17 14:17:20 -05:00
committed by Dave Methvin
parent f36568324d
commit dec2804c78
2 changed files with 13 additions and 0 deletions

View File

@@ -456,6 +456,10 @@ function cloneFixAttributes( src, dest ) {
// cloning other types of input fields
} else if ( nodeName === "input" || nodeName === "textarea" ) {
dest.defaultValue = src.defaultValue;
// IE blanks contents when cloning scripts
} else if ( nodeName === "script" && dest.text !== src.text ) {
dest.text = src.text;
}
// Event data gets referenced instead of copied if the expando