kubetail-org / sentineljs

Detect new DOM nodes using CSS selectors (650 bytes)
MIT License
1.13k stars 51 forks source link

Display:none elements don't get watched #14

Closed petermonte closed 4 years ago

petermonte commented 4 years ago

A good point to warn people on the documentation is that any element that has its default property display to none will not get called under Sentinels watch. Unless there is a css property to watch, that even with no rendering or display, it gets listed under the transitionend event.

here is an example of the display:none impact: https://codepen.io/petermonte/pen/LYPKKQQ

amorey commented 4 years ago

Thanks! I added a test to verify that visibility:hidden doesn't exhibit the same behavior as display:none and updated the README. If you'd like to add your name to the contributors list please add it here and issue a PR: https://github.com/muicss/sentineljs/blob/master/AUTHORS.txt

petermonte commented 4 years ago

@amorey credits are all for you for the great job you're doing. Thanks.