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

bug: LdInput readonly bind on boolean value are still editable #973

Closed
3 tasks done
dpitois opened this issue Oct 6, 2023 · 1 comment · Fixed by #974
Closed
3 tasks done

bug: LdInput readonly bind on boolean value are still editable #973

dpitois opened this issue Oct 6, 2023 · 1 comment · Fixed by #974
Assignees
Labels
bug An issue describing unexpected or malicious behaviour. confirmed This label indicates that the issue has been reproduced and verified by the core team. released

Comments

@dpitois
Copy link

dpitois commented Oct 6, 2023

Prerequisites

Liquid version

5.6.4

Framework bindings

React

Current behavior

<LdInput /> with attribute readonly or disabled bind to a boolean value are still editable.
When passing the boolean value as string, the input becomes non editable as expected.

{* still editable *}
<LdInput disabled={true} readonly={true} />
{* not editable *}
<LdInput disabled="true" readonly="true" />

Expected behavior

The input should act as readonly or disabled when I bind a boolean value to these attributes.

Steps to reproduce

  1. open the repro case codesandbox
  2. try to type into the 3 first inputs: you can type in
  3. try to type into the 3 last inputs: you cannot type in

Code reproduction URL

https://github.com/dpitois/ld-Input-attributes

Additional information

To mention we are using Preact v10 (not React) with Liquid React bindings.

@dpitois dpitois added bug An issue describing unexpected or malicious behaviour. triage An issue that needs assessment to determine its validity and urgency labels Oct 6, 2023
@dpitois dpitois changed the title bug: bug: LdInput readonly bind on boolean value are still editable Oct 6, 2023
@borisdiakur borisdiakur added confirmed This label indicates that the issue has been reproduced and verified by the core team. in progress This label indicates that the issue is currently being worked on. and removed triage An issue that needs assessment to determine its validity and urgency labels Oct 9, 2023
@borisdiakur borisdiakur self-assigned this Oct 9, 2023
@borisdiakur borisdiakur removed the in progress This label indicates that the issue is currently being worked on. label Oct 10, 2023
github-actions bot pushed a commit that referenced this issue Oct 10, 2023
## [5.12.5](v5.12.4...v5.12.5) (2023-10-10)

### Bug Fixes

* css selectors for aria-disabled elements ([462aa5f](462aa5f))
* **ld-input:** disabled, aria-disabled and readonly props ([2f9d8c1](2f9d8c1)), closes [#973](#973)
* **ld-input:** use placeholder opacity instead of color ([ab72034](ab72034))
* make sure css specificity doesn't change for aria-disabled selector ([77cb5fa](77cb5fa))
@borisdiakur
Copy link
Contributor

🎉 This issue has been resolved in version 5.12.5 🎉

The release is available on:

📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug An issue describing unexpected or malicious behaviour. confirmed This label indicates that the issue has been reproduced and verified by the core team. released
Projects
None yet
2 participants