Problem is not limited to only input element and name property (attribute), test case can be reproduced on all elements and all attributes (properties), except for value attribute.
Wow, if this fixes the problem it would be great! What kind of performance hit are we going to get by having an extra .getAttribute() call for every .setAttribute()? I suppose we are only in this hook on oldIE, but the problem only occurs on IE7, right?
.getAttribute() call for every .setAttribute()?
Not exactly on every setAttribute, boolean attributes and specific hooks, like for style attribute would not be affected.
for nodeHook it's 30%
for jQuery#attr it's 9%
I suppose we are only in this hook on oldIE
IE8 does not use it.
but the problem only occurs on IE7, right?
Not only that, but this fix deals with very specific edge case, which does not happen very often.
The perf hit is a bit worrisome. Would it be crazy to try to do this in manipulation.js/cloneFixAttributes, since it only happens with cloned elements? In essence we would be eliminating mergeAttributes and copying the attributes ourselves. That will make cloning slower but it won't slow down general attribute retrieval which is much more common.
Why are these attr gets here? We're not using the result.
We are not, just like in here and here.
But in order to trigger the error, we have to do that, remember?
Fix #9646. Cloned nodes shouldn't affect original in IE7. Close gh-947.