Topic: INPUT SEARCH - input event not fired when escape pressed
When escape is pressed in the search input field, the "input" event is apparently not triggered. If the cross is clicked, the event is triggered. So the question is: Is it a bug that the Escape event is not executed or is this state captured in another way?
It can be feature of browser (chrome+firefox do not fire event). So is some "correct" way compatible with MDB usage how to cover this situation correctly?
Kamila Pieńkowska
staff answered 1 months ago
We kept the default behaviour of input type search, so you normally get an event input when you use x
in the input. Also, it is consistent with the native tag that using Escape
does not trigger an input event, so if you need to know when it's used, you need to add a separate listener.
FREE CONSULTATION
Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.
Answered
- User: Pro
- Premium support: Yes
- Technology: MDB Standard
- MDB Version: MDB5 9.0.0
- Device: PC
- Browser: Chrome
- OS: Win11
- Provided sample code: No
- Provided link: No