Topic: Input update method does not reset floating label if field is empty
Expected behavior
The update
method of the Input
component moves the floating label back inside the input when the input is empty.
Actual behavior
The update
method of the Input
component does not move the floating label back inside the input when the input is empty. This is a problem if you register a custom onblur
handler that deletes the input and the handler gets executed after MDB's.
The only way to handle this situation appears to be re-firing the blur
event after resetting the value, and having the event handler check the isTrusted
property to determine if the event was fired by user interaction or was fired programmatically (re-thrown).
FREE CONSULTATION
Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.
Open
- User: Pro
- Premium support: Yes
- Technology: MDB Standard
- MDB Version: MDB5 3.8.1
- Device: PC
- Browser: Chrome
- OS: Windows 10
- Provided sample code: No
- Provided link: No
Michał Duszak staff commented 3 years ago
Could you please reproduce your issue in a snippet?
UNNdev pro premium priority commented 3 years ago
https://mdbootstrap.com/snippets/standard/kayem79/3171028#js-tab-view
Michał Duszak staff commented 3 years ago
Thank you. We will discuss this in our team and try to deliver the most suitable solution.