Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Technical Bug] Amend checkboxes are always checked initially #2231

Closed
Malik12tree opened this issue Mar 16, 2024 · 0 comments
Closed

[Technical Bug] Amend checkboxes are always checked initially #2231

Malik12tree opened this issue Mar 16, 2024 · 0 comments

Comments

@Malik12tree
Copy link

What are you trying to do, and what do you expect to happen?

Code

Undo.amendEdit(
  {
    reverse: { type: "checkbox", label: "Reverse", value: false },
    ...
  },
  ...
);

Expected Initial Result

image

What happens instead?

Actual Result

image

Possible Cause

HTML treats a checkbox as "checked" when the checked attribute is present regarding the value.
Thus, checked="false" is identical to checked="true" identical to checked="foobar"

image

Model format in which the issue occurs

N/A

Blockbench variant

Website, PWA, Program

Blockbench version

4.9.4

Operating System

Unrelated

Installed Blockbench plugins

No response

@Malik12tree Malik12tree changed the title [Technical Bug] Amend checkboxes do not take in default values. [Technical Bug] Amend checkboxes are always checked Mar 16, 2024
@Malik12tree Malik12tree changed the title [Technical Bug] Amend checkboxes are always checked [Technical Bug] Amend checkboxes are always checked initially Mar 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant