Topic: Autofocus material input doesn't work

Custer priority asked 4 years ago


Expected behavior

If the autofocus on a input field is set, the label should automatically move up.

Actual behavior

The label doesn't move up. You have to klick in the input field again, that the label moves up.

Resources (screenshots, code snippets etc.)

enter image description here


Mateusz Łubianka staff answered 4 years ago


Hi @Custer,

You're right. There is a little issue with autofocus. I will add a task with this problem to our 'to do' list and we will fix this as soon as possible. For now you can add focus to input by jQuery:

$(document).ready(function() {
    $('#inputLGEx').focus();
})

Thank you very much.

Best,


Custer priority commented 4 years ago

Perfect, thank you :)


Mateusz Łubianka staff commented 4 years ago

I'm glad it works well :)


Custer priority commented 4 years ago

Solved in new version. Thanks.


FREE CONSULTATION

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

Status

Closed

Specification of the issue

  • ForumUser: Priority
  • Premium support: Yes
  • Technology: MDB jQuery
  • MDB Version: 4.13.0
  • Device: Computer
  • Browser: Chrome (newest)
  • OS: Windows 10 (1903)
  • Provided sample code: No
  • Provided link: No