Topic: MDB Stepper Form Enter Key Pressed Issues
athleticssoftware pro asked 3 years ago
Expected behavior We are using an MDB Stepper inside of a form. When an input control has focus and a user hits enter on their keyboard the stepper should not go backwards to the last (previous) step.
i.e. When the user presses the enter key while inside an input control it should do nothing unless that input control is a calendar or a select.
Actual behavior In our stepper for some reason, when an input control has focus and the user presses enter on their keyboard the stepper goes backwards to the last (previous) next step. This happens even if the form does not meet validation requirements. When a user tabs into an input control that happens to be a MDB calendar and hits enter it doesn't show the calendar modal and it returns back one step.
Resources (screenshots, code snippets etc.) I can share the code in part or privately if requested (there is a lot of it).
You have to add
.linear class to your treeview ul (second line in the snippet). Also, you have to add the
required attribute to all of your required inputs, so your stepper won't go into another step if previous values are empty :)
Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.
- User: Pro
- Premium support: No
- Technology: MDB jQuery
- MDB Version: 4.19.0
- Device: Desktop
- Browser: FF 80.x & Chrome
- OS: Windows 10
- Provided sample code: No
- Provided link: No