Skip to content

fix: createRadio().disable(false) does not re-enable radio inputs - #9338

Open
aryanb1906 wants to merge 1 commit into
processing:mainfrom
aryanb1906:fix-radio-disable-false
Open

aryanb1906 wants to merge 1 commit into
processing:mainfrom
aryanb1906:fix-radio-disable-false

Conversation

@aryanb1906

Copy link
Copy Markdown

Summary

  • Fixes createRadio().disable(false) not re-enabling radio inputs
  • Root cause: setAttribute('disabled', false) sets the attribute to the string "false", which HTML still treats as "present" so the input stays disabled
  • Fix: use the DOM property (radioInput.disabled = shouldDisable) instead of setAttribute, which correctly toggles enable/disable

Test plan

  • Added a unit test that disables then re-enables radio inputs and verifies they are enabled
  • Existing disable test still passes

Closes #9316

setAttribute('disabled', false) sets the attribute to the string "false",
which still counts as present and keeps the input disabled. Using the DOM
property (radioInput.disabled = shouldDisable) correctly enables/disables.

Closes processing#9316
@welcome

welcome Bot commented Oct 26, 2026

Copy link
Copy Markdown

🎉 Thanks for opening this pull request! For guidance on contributing, check out our contributor guidelines and other resources for contributors!
🤔 Please ensure that your PR links to an issue, which has been approved for work by a maintainer; otherwise, there might already be someone working on it, or still ongoing discussion about implementation. You are welcome to join the discussion in an Issue if you're not sure!
🌸 Once your PR is merged, be sure to add yourself to the list of contributors on the readme page !

Thank You!

@aryanb1906

Copy link
Copy Markdown
Author

Resolves #9316

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

Successfully merging this pull request may close these issues.

[p5.js 2.0+ Bug Report]: createRadio().disable(false) does not re-enable radio inputs

1 participant