Bug 1696123 - Always copy the checkedness of input elements r=edgar

Differential Revision: https://phabricator.services.mozilla.com/D107130
This commit is contained in:
Kagami Sascha Rosylight
2021-03-09 14:12:34 +00:00
parent b03d056b6d
commit e356310f38
2 changed files with 27 additions and 25 deletions

View File

@@ -1115,18 +1115,18 @@ nsresult HTMLInputElement::Clone(dom::NodeInfo* aNodeInfo,
}
break;
case VALUE_MODE_DEFAULT_ON:
if (mCheckedChanged) {
// We no longer have our original checked state. Set our
// checked state on the clone.
it->DoSetChecked(mChecked, false, true);
// Then tell DoneCreatingElement() not to overwrite:
it->mShouldInitChecked = false;
}
break;
case VALUE_MODE_DEFAULT:
break;
}
if (mCheckedChanged) {
// We no longer have our original checked state. Set our
// checked state on the clone.
it->DoSetChecked(mChecked, false, true);
// Then tell DoneCreatingElement() not to overwrite:
it->mShouldInitChecked = false;
}
it->DoneCreatingElement();
it->mLastValueChangeWasInteractive = mLastValueChangeWasInteractive;