Topic: Input label doesn't work with autoFocus

jkilbride free asked 4 years ago


When I use the autoFocus attribute on a form input, the label doesn't respond correctly.
<Input
 group
 autoFocus
 id="email"
 type="email"
 label="Email"
 icon="envelope"
 value={this.state.email}
 />
https://imgur.com/xWVtMmT The label doesn't reset correctly until the blur event on the field. Thanks, --jeff

Gerardo Cignarella Godoy free commented 2 years ago

Hi! Two years later, I am implementing this framework in a project and it follows the bug.

Solution: use the autofocus attribute and add this line to document ready $ ("[autofocus]"). Parent (). AddClass ("is-focused");


Jakub Chmura staff commented 2 years ago

Hi @Gerardo Cignarella Godoy Are you sure that you are writing about the React.js MDB package?


Mikołaj Smoleński staff answered 4 years ago


Hello, Thanks for letting us know about that issue. We've added it to our most important features and try to implement in one of the next releases. Regards

Please insert min. 20 characters.

FREE CONSULTATION

Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.

Status

Answered

Specification of the issue

  • User: Free
  • Premium support: No
  • Technology: MDB React
  • MDB Version: -
  • Device: -
  • Browser: -
  • OS: -
  • Provided sample code: No
  • Provided link: Yes
Tags