Detecting if an input field spawned an autorun list?

My problem: I have a keyup event attached to a field. If a previously printed startup list is displayed and you select a value from the keyboard, the keyup event for the field fires. However, I do not want him to shoot at this moment.

Is it possible to determine whether the input field for the previously entered autorun list appears?

When I check the field through Firebug after the startup list appears, I do not see the corresponding DOM element. I also do not know any events related to startup lists.

Any help is appreciated. Thanks.

+4
source share
1 answer

If you are talking about the built-in autocompletion function of the browser form, then no, there is no way to detect it or interact with it through javascript.

Perhaps you can cancel it in some browsers through event.prevetDefault() , to be honest, I have not tried it and consider it doubtful.

This feature is user-friendly and should not concern website operators or developers - leave it alone and your users will be better for you;)

+1
source

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


All Articles