Skip to content

Comment on P99 0 ms* autocomplete for 240M domain namesparent

Comments

What autocompletes are you testing? I set my repeat delay to be very long so it doesn't interfere with the test, and then went to google and held down some keys for half a second. It types the letter and autocompletes long before I let go.

Every UI I can find types the letter on keydown, and I don't know why you'd want typing and autocomplete to use different timings.

Waiting for release is for mice and touch, not keyboards. And that's only because they have to deal with dragging.

Your test is flawed, it's triggering keyup if it's showing in the input.

I go to the text box in HN and hold down a key.

The letter appears instantly, then after a moment a lot more copies of the same letter start showing up rapid-fire.

What are you calling flawed about my test?

This happens on both Windows 10 and Linux Mint, in Firefox.

Overall the correct event to listen to would be the input even not the keydown event since it handles the edge cases I mentioned earlier

I never meant to infer that the keyup event is specifically what should be listened to

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.