Skip to content

Breaking usage of MDBInputΒ #3

@simonprast

Description

@simonprast

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions