Skip to content

fix(BaseInputV3): static label click issue#393

Open
Nil0ofar wants to merge 2 commits intomainfrom
fix/baseInputV3/matchIdWithLabel
Open

fix(BaseInputV3): static label click issue#393
Nil0ofar wants to merge 2 commits intomainfrom
fix/baseInputV3/matchIdWithLabel

Conversation

@Nil0ofar
Copy link
Copy Markdown
Contributor

@Nil0ofar Nil0ofar commented Mar 9, 2026

This resolves the issue where clicking the floating label did not focus the input when an explicit id was passed.

  • Ensure 'for' attribute always matches the id.
  • Compute inputId from explicit id if provided, otherwise fallback to name.
  • Prevent id override of the name attribute.
  • Added unit tests to cover:
    • default id behavior
    • explicit id behavior
    • label association with input id
    • name preservation when id is provided

@Nil0ofar Nil0ofar self-assigned this Mar 9, 2026
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.

2 participants