[custom elements api] Cannot set properties of null (setting 'parent') with { shadowRoot: false } #13199
Labels
🔨 p3-minor-bug
Priority 3: this fixes a bug, but is an edge case that only affects very specific usage.
scope: custom elements
Vue version
3.5.13
Link to minimal reproduction
https://play.vuejs.org/#eNqtVU1v2kAQ/StTXzAKH+nHiQJqg5CaHtooidSLL449hk2WXWt3DZGQ/3tnvXZsg0OD0hN45s3s23nP4733PU1H2wy9iTfVkWKpAY0mS+eBYJtUKgN7hckAIrlJM4NxDomSG+hRSe8Fslj+UWGaovotsMyPxs2gPaEDfr+Tx3AKlvBARFJoA0zfreVOwAyIip+EXGP/a52OZCZMmbzs1/GHzBgp7vHZJiv+vt+fzWEfCACWgF/UjrYhzxBmsxlc9qmNyZSAnj2zfTNqa1AYYtZd/LEu/sFiPK/40xtOhnAVMgGhiEkkBLNGQKWk6mw6b7a8NrBjnIPALSqKiph+im5UmxdDC0SSicgwKWBNJyC/Kua34Cx68vtuYk6IijV8aAUsokHg4oI6B2I6drYiQ9GDwU3KQ4P0BDB1CsG3yJ4xC7yjcwNvvt/XOub5dOyeim7UoTWlSUmHOpX/qN7CmkCy19id3nIohabjBjtv4BlNY0/YavSopaD3oxhB4FknMU5FqZ2VDryJs5PNhZzL3c8iZlSGgyoerTF66og/6mcbC7wbhRrVFgPvJWdCtULj0su7X3T9RnIj44wT+kTyFrXkmeXoYFeZiIl2A1ewvS7eSSZW93r5TCbT1aUsUYvMC3zg0Tu5OHH1mu7n0ZeijuSnKS4ybeRmyXFDBi5XweGyAR6KFalmqGVj8UCMCRN4o2Sqobl4ipe/kZw23TmBByk5hgTJ5z5Z+5QDY7aF7ZAlXZbRXBqovELADou0LlcuLnu5o0PO6XmwN987rHrtHihRr94OieyMD1q3YO/Qo9rPi6UlMevq7h9SGhALvQ5jubuV0kyg+AiAW1x28X2ImgV6RFb0ey42RBccSoG9ft859gDuKHRWDBxP+8H5xzY7LrYbaahfW0nWC5UVjmtPOaPhtFe+2W+RrMsWrS9yh7md1JV+Fv0G/Qj2P/QzO3mmfrbC6kcEztePikul3GWgTAAlqg9yp3iusCGel/8FmKlMQQ==
Steps to reproduce
Click on the button multiple times and see
Cannot set properties of null (setting 'parent')
What is expected?
No issue with setting parent and
Custom element two content
renders properly when we click on the button multiple timesWhat is actually happening?
First time custom elements are mounted properly, then we hide them clicking on the button.
When we click on the button again to show them once again, the exception is thrown on this line of code
System Info
Any additional comments?
The issue is related to the slots within custom elements created from Vue 3 components. Looks like something is related to custom elements lifecycle and how Vue 3 uses them.
The text was updated successfully, but these errors were encountered: