Topic: Material Select tab index
stcolettawi priority asked 6 years ago
I am trying to use a searchable material select field in my form. How do I make the search field be where the tab key places focus when tabbing through a form? When you tab through the form now it activates the select list displaying all of the choices and the search field, but if you try to just start typing nothing happens. I would like it to put the focus in the search field so that you can just start typing what you want to find.
Add comment
Mikołaj Smoleński staff answered 6 years ago
Hello,
For this moment I suggest to add the following code to our mdb.js file:
$('.search').focus();
It should be added in this section:
// Show dropdown
activates.stop(true, true).css('opacity', 0).slideDown({
queue: false,
duration: options.inDuration,
easing: 'easeOutCubic',
complete: function complete() {
$(this).css('height', '');
}
}).animate({
opacity: 1,
scrollTop: 0
}, {
queue: false,
duration: options.inDuration,
easing: 'easeOutSine'
});
$('.search').focus();
}
Regards
FREE CONSULTATION
Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.
Status
Resolved
Specification of the issue
- ForumUser: Priority
- Premium support: Yes
- Technology: MDB jQuery
- MDB Version: -
- Device: -
- Browser: -
- OS: -
- Provided sample code: No
- Provided link: No
Tags