Bug 1358448 - Add radio back to a radio group after moving out of a form. r=smaug
The container of a radio group is the form, if it belongs to a form, or the document object otherwise. When moving a radio out of a form, we should add it back to a radio group. Similary, before moving the radio to a form, we should remove it from the original radio group. MozReview-Commit-ID: 22WsEhz2SXH
This commit is contained in:
@@ -386,7 +386,7 @@ CollectOrphans(nsINode* aRemovalRoot,
|
||||
if (node->HasFlag(MAYBE_ORPHAN_FORM_ELEMENT)) {
|
||||
node->UnsetFlags(MAYBE_ORPHAN_FORM_ELEMENT);
|
||||
if (!nsContentUtils::ContentIsDescendantOf(node, aRemovalRoot)) {
|
||||
node->ClearForm(true);
|
||||
node->ClearForm(true, false);
|
||||
|
||||
// When a form control loses its form owner, its state can change.
|
||||
node->UpdateState(true);
|
||||
|
||||
Reference in New Issue
Block a user