Xojo2025R3: WebCheckbox.Visible = False ignored when using "Bootstrap.min.css"

I am sharing my latest “discovery” in case someone may find it useful.

I have noticed this obscure issue with the WebCheckbox in Xojo2025R3. The checkbox is set to be disabled and invisible (the control should stay on the page but not be exposed to the user for the time being). In Xojo2025R2.1 and previous releases the checkbox was correctly hidden (user did not see it). However, in Xojo2025R3 the checkbox “magically” showed up.

This WebApp is using “Bootstrap.min.css” file.

It turns out that I had to explicitly add the following code to the “Bootstrap.min.css” file to make it work:

.XojoCheckbox[style*="display: none"] {
  display: none !important;
}

(using auxiliary file for that and merging via “yarn build” in VSC)

Additionally ChatGPT gave me this:

Is this a Xojo bug?

Partially.

Xojo 2025R3:

  • Correctly emits display:none

  • Does not guard against CSS frameworks overriding it

Xojo Web controls are not Bootstrap-aware, so once you introduce Bootstrap, you must explicitly protect visibility rules.


Best practice going forward

When using Bootstrap with Xojo Web:

:check_mark: Always explicitly lock visibility-sensitive controls
:check_mark: Prefer CSS-based hiding for dynamic UI
:check_mark: Treat Visible = False as advisory, not authoritative, once Bootstrap is involved

This is an AI hallucination or it’s talking about Web 1. Every built-in Web 2 control is bootstrap aware.

3 Likes

From what you wrote it seems to indicate that only using Bootstrap.min.css will cause problems.

From Release Notes:

Web now uses Bootstrap v5.3.7

maybe your Bootstrap.min.css is not compatible in some way?

Well, I can’t comment on this except that I had to add extra code to make it work.

Maybe I need to update the bootstrap file again, but as you can imagine, I hesitate. The solution works for now and I should see how it behaves going forward as more Xojo releases become available. In any case I intend this WebApp to say on the “latest and greatest” Xojo.

Create a sample showing the issue that works “correctly” in 25r2.1 and “wrong” in 25r3, report it for inspection and fix.