rufus2021
rufus2021

Reputation: 54

Android onkeypress vs oninput in text input

recently while building an autocomplete widget for a mobile site i'm working on i came across this bug. Android, tested on 2.3, handles the oninput event incorrectly. It seems to fire the event two times instead of just once. firefox on android seems to be doing the the thing.

i had to change to onkeypress to avoid the multiple events.

Upvotes: 1

Views: 1882

Answers (1)

anonimo
anonimo

Reputation: 21

https://github.com/ryanseddon/H5F/pull/4

seems that "onkeypress" performs better for these tasks

Upvotes: 2

Related Questions