-
-
Notifications
You must be signed in to change notification settings - Fork 33.7k
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
Scoped CSS attribute is reused or discarded when switching between components with scoped CSS #10416
Comments
not only functional components,use functional components just to make sameVnode true,a functional component and a normal dom is ok as well |
I tested with the 4 possible combinations among regular and functional components and the problem only appears when both are functional If you are up to give the fix a try, you can. If other things break, you should see tests failing |
similar bug, affected pure normal components with slot, please see my simple demo. |
@CzBiX |
@sin1ght It's weird I couldn't see the problem in your repro using regular components but others' repro do show so I adapted the title. Sorry about that! |
Hi, I'm interested interested in this particular task, how to I go ahead |
When patching a node the scope id might change. When it does the flow should be followed for updating non-same elements to make sure it is updated correctly in the DOM. fix vuejs#10416
Version
2.6.10
Reproduction link
Steps to reproduce
After npm run serve, click the toggle button and find that child has no style.
Child and child2 components are reused, child's data-v-* disappears, causing the style to disappear
What is expected?
Child should have a black background scope style
What is actually happening?
Child without style
The text was updated successfully, but these errors were encountered: