Firefox "find as you type" contradicts javascript key events

firefox has "find as you type" functionality that is super-awesome. but when developing web applications javascript and I want to respond to key events, only the first key is captured, and then all the rest go to the search field.

Is there any way to disable this with vanilla js? (without frameworks like mootools)

I tried return false;at the end of the event handler, but it does not work. any ideas?

+3
source share
1 answer

Have you tried the preventDefault()object method event?

keyup/keydown/keypress (, , ), , .

+1

Source: https://habr.com/ru/post/1791978/


All Articles