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

Breaking usage of MDBInput #3

Open
simonprast opened this issue Feb 1, 2021 · 0 comments
Open

Breaking usage of MDBInput #3

simonprast opened this issue Feb 1, 2021 · 0 comments

Comments

@simonprast
Copy link
Member

There is a kinda critical usability bug in two files where MDBInput is used:
src/client/pages/index.js
src/client/pages/items/[slug].js

When mouse-clicking the label of an input field (email, phone), the name input field will become active, due to the label's non-unique field reference.

...
<div className="md-form">
  <MDBInput
    icon="envelope"
    label="E-Mail"
    iconClass="grey-text"
    type="email"
    id="form-name"  <------------------
    name="email"
    onChange={(e) =>
      this.setState({
        [e.target.name]: e.target.value,
      })
    }
    value={this.state.email}
    outline
    required
  />
</div>
...

Please change the id attribute of your MDBInput fields to something unique, e.g. form-email, form-phone, etc.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant