`post_instantiate` is morally equivalent to duplicating the display object it's called on, so we should also duplicate the XML document attached to it.
We don't have to do this for `object` because we don't actually construct the script object until instantiation time.
This commit is contained in:
parent
a3f4509d63
commit
7e7ca88c3d
|
@ -476,6 +476,12 @@ impl<'gc> TDisplayObject<'gc> for EditText<'gc> {
|
|||
|
||||
text.object = Some(object);
|
||||
}
|
||||
|
||||
text.document = text
|
||||
.document
|
||||
.as_node()
|
||||
.duplicate(context.gc_context, true)
|
||||
.document();
|
||||
}
|
||||
|
||||
fn object(&self) -> Value<'gc> {
|
||||
|
|
Loading…
Reference in New Issue