You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
jmsjtu
changed the title
Light Dom slots trigger disconnectedCallback
Light Dom slots don't trigger disconnectedCallback in synthetic lifecycle
Oct 21, 2023
Does this affect scoped slots as well? And lwc:if/elseif/else? Those all use VFragments as well.
@nolanlawson I did some more investigation related to this question and posted a new issue #3827
Working on updating #3824 to bring the light DOM slot behavior back to parity with LWC 3.x.x and opened #3827 to investigate the new bug that's been discovered.
Description
Now that light DOM slots use fragments (#3649), they don't trigger
disconnectedCallback
whenENABLE_NATIVE_CUSTOM_ELEMENT_LIFECYCLE
is not set.Steps to Reproduce
Repro:
https://stackblitz.com/edit/salesforce-lwc-fcxo47?file=src%2Fmain.js
In the above example, the
disconnectedCallback
should be invoked when swapping between the if conditions.The text was updated successfully, but these errors were encountered: