Hi there, not sure if this is a bug or I’m doing something dumb.
I’ve got a column container with three checkboxes. The first is always shown, the second and third only appear if a search count > 1 or > 2, respectively. (For context, this is a list of partner teachers at a school. If there’s one teacher, there’s one checkbox. Two teachers, two checkboxes, etc.)
The search and labels on the checkboxes are dynamic based on a dropdown where users can select what school they’re inputting data for. Everything works fine in the Responsive editor as I show and hide the elements, but on both the preview and live pages, switching from a one-teacher school to a multiple-teacher school and then back to a one-teacher school leaves a gap, despite all checkboxes having “collapse when hidden” enabled. If I never select a multiple-teacher school, there is no gap where those elements live. It only shows up after the elements have been shown and then hidden again.
Each checkbox and the column container are set to height: fit with a minimum of 0 pixels.
What are the settings for visibility? Best practices for items not visible all the time is to have the checkbox for visible on page load unchecked so defaults to not visible and then have a condition to make it visible. No need a condition to make it not visible.
I feel like I have seen this issue before and Bubble support had to do the fix. It might be worth submitting a bug report so they can look at it since you can reproduce it consistently. A way to really prove it to them that it is a bug is by creating a brand new app with the same issue and show them with the minimum amount of elements on the screen to just recreate the issue. Hope that helps. I suggest creating the new app before submitting the issue to Bubble. That way you will have an ironclad report. Hope that helps.
Funny. It is indeed a bug. I don’t work with checkboxes very often, so I never noticed it. If you put each checkbox inside a group and condition the group’s visibility instead of the checkbox’s visibility directly, the bug goes away.
The issue seems to be related to the checkbox itself.
Huh! I wonder if it’s a bug to do with the new responsive mode, then, since conditional height collapse used to only be available on containers and not individual elements.
I’ve run into this problem before with checkboxes - in our case, I suspected it was partially due to some custom CSS we were applied to checkboxes. As others mentioned, wrapping in a group and hiding that group fixed it.