-
Notifications
You must be signed in to change notification settings - Fork 2k
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
dom-if that contains a slot not working (without restamp) #4977
Comments
In non- It's not clear if implementations will actually change to use actual As for alternatives, As such, I think the best workaround for now would be to use |
Alternatively, simply wrapping the |
It may be possible for us to fix this issue by detecting and removing |
Fixes #4977. When templatized content is hidden (via `_showHideChildren`) as in `dom-if` top level `<slot>` elements are now removed instead of being hidden. This ensures that assigned nodes are not displayed in false-y dom-if elements.
Description
The following code is not correctly working:
When the
toggle
becomestrue
and the template is stamped for the first time, the slotted content appears. When thetoggle
becomes false again, the slotted content does not disappear. When therestamp
attribute is applied todom-if
, it works. But withoutrestamp
, it doesn't.Live Demo
http://jsbin.com/fazewarake/edit?html,console,output
Steps to Reproduce
test-slotted
elementtest-main
element and put<test-slotted>
in the contentdom-if
intest-main
with a toggle that toggles a<slot>
Expected Results
Toggling the slotted element using
dom-if
works.Actual Results
The slotted element appears, but then doesn't disappear when the
dom-if
becomes false. Note that when applying therestamp
attribute todom-if
, it works.Versions
The text was updated successfully, but these errors were encountered: