viewmodel icon indicating copy to clipboard operation
viewmodel copied to clipboard

default display state of nodes that have if\unless

Open avalanche1 opened this issue 9 years ago • 5 comments

I stumbled into an issue where nodes that have if\unless bindings when their default value is false\true (respectively for if\unless) or binded method evaluates to false\true - they flash briefly before being hidden (depending on browser, cpu performance, etc). In such cases I had to opt out for Blaze '#if' which doesnt render the node at all. I suggest that all nodes that have if\unless bindings have dispay: none by default to prevent this.

avalanche1 avatar Oct 21 '16 22:10 avalanche1

There is really no need to fallback to Blaze #if due to this. Adding style="display:none;" to the element's attribute list works fine...

hluz avatar Nov 07 '16 04:11 hluz

Are you kidding?

avalanche1 avatar Nov 08 '16 09:11 avalanche1

Does it sound like?

hluz avatar Nov 08 '16 11:11 hluz

Sounds inconvenient and anti-DRY if you're serious.

avalanche1 avatar Nov 09 '16 16:11 avalanche1

I need to check on this because I was pretty sure if a property had a default of false then the flash wouldn't occur.

ManuelDeLeon avatar Nov 09 '16 16:11 ManuelDeLeon