Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Teleport children don't trigger unmounted hook when teleport is disabled #7821

Closed
wolf991 opened this issue Mar 3, 2023 · 3 comments
Closed
Labels
has PR A pull request has already been submitted to solve the issue 🐞 bug Something isn't working scope: teleport

Comments

@wolf991
Copy link

wolf991 commented Mar 3, 2023

Vue version

v3.2.47

Link to minimal reproduction

https://sfc.vuejs.org/#eNqVUk2PmzAQ/SsjLiRqAO22UqU0iVL13FPVG5cEJkDXeCzbkK4Q/71j85GESpH2hmfevPfmDV3wXam4bTDYBjuLtRIni4dUAuzKl0PXQW0K6Ptdwi+u7vKqhTaqLvs0sFQUAtPAo4GHBSrSFvLKnM4CcwfRDQPg2ErKMWpkTY20vjN+r8J5DFuUNlwz3BIDzpS/T9zMnlGtnvJ4gOeAF8+SzLPsefr+INPrgimZqXxCyWR+CGzuuqDE6YxiwJqSruBYPaqSqrFg3xWyaFZi9namv6zSRjVbEstgd8nE5OTm+/DTZLpSFgzaRjloVfscvf2LphrCOPnBD3fd8NbvNF76ETB0MpLG+kPvIfyFCDm2lkgY5pKGxA0zOGMYc6zccdffUnlpZGYrkjAleC1p3Tnv43gsqFiFY3dUhk/gYKns3WLDKodgE0yGF7/jfMMShaD7tB9SWWYyrUzy53Bn2JD8PR39MQWAGbVarWF/gO5xAR/sOBquoWfzbmamezLld7+N3S88WIzqk4r/GJK8t48uHRsmDbbgK67GTt07DUprldkmSSPVWxGzRnLkXqLZSFVjlFN9/By/xl++ckrG3tdjNHV01nQ1qFkxDTZ35AkXW9SRRpmjRv1UbIF9EFz0/hN1mnz5Puj/Aawwip4=

Steps to reproduce

Use <teleport> component and add some components to it. Set the disabled attribute to true.

What is expected?

The child components should trigger the unmounted hook.

What is actually happening?

The child components don't trigger unmounted hook.
When the disabled attribute is set to false the events trigger as expected.

System Info

No response

Any additional comments?

No response

@yangxiuxiu1115
Copy link
Contributor

Maybe it's intentional. I found this comment in the source code.

// an unmounted teleport should always remove its children if not disabled

@LinusBorg LinusBorg added 🐞 bug Something isn't working scope: teleport labels Mar 8, 2023
@baiwusanyu-c
Copy link
Member

#6529 might fix this

@haoqunjiang haoqunjiang added the has PR A pull request has already been submitted to solve the issue label Mar 16, 2023
@baiwusanyu-c
Copy link
Member

completed 4162311

@github-actions github-actions bot locked and limited conversation to collaborators Dec 21, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
has PR A pull request has already been submitted to solve the issue 🐞 bug Something isn't working scope: teleport
Projects
None yet
Development

No branches or pull requests

5 participants