Teleport target change is lost if happened while teleport is disabled
Vue version
3.2.47
Link to minimal reproduction
Steps to reproduce
- Set the initial the teleport component target (
to="#target1"
) - Disable the teleport component (
:disabled="true"
) - Change the teleport target (
to="#target2"
) - Enable the teleport again
When the teleport is re-enabled, the content is still teleported to the old target (#target1) even though the to property of the teleport component has been updated to "#target2"
What is expected?
Changes to the target of the teleport component (the to
property), even if happened while the teleport is disabled, should still be honored when the teleport is re-enabled.
What is actually happening?
Changes to the target of the teleport component (the to
property) are ignored if they were made while the teleport is disabled.
System Info
No response
Any additional comments?
Looks like Vue can indeed handle the teleport target change, but Vue only handles it while the teleport is enabled.
Looks like Vue can indeed handle the teleport target change, but Vue only handles it while the teleport is enabled.
Correct, it seems that we also need to handle target changes when teleport is disabled.