container-query-polyfill
container-query-polyfill copied to clipboard
Container query stops working when changing DOM
It seems that under some specific circumstances, changes in DOM either aren't detected or for some other reason, the generated class is not reattached to @container
-affected elements.
It seems that two container queries are needed to reproduce the issue.
Minimal example: https://jsfiddle.net/edt3b1Lz/
After clicking on Render A
, .a
's container query stops working until the container is resized.
I am experiencing the same thing, my components loads in async(about 7 secs after cqfill loads), and sometimes cqfill handles it well, but most of the time it doesn't. Looks like the style tag is modified with all the new cqfill classes, but it is not being attached to the elements inside the container. Resizing fixing my issue as well
Are there any updates on this?
Did anyone find any workaround ?
My workaround so far has been to redraw the whole container, which isn't ideal.
same problem here
same problem here
This issue should be fixed by the newest version of the polyfill (currently in alpha). Please give it a try and let me know if you run into any further issues.
Thank you!