Hacker News new | ask | show | jobs
by montroser 28 days ago
Good stuff, except don't get too excited about `datalist`. It just doesn't have enough hooks to be actually useful for anything other than a little prototype.
2 comments

I've used a datalist for autocomplete suggestions and it's worked great.
I've had problems with <datalist> not showing when the input is misspelled, or when none of the <options> strictly begin with the input. I gave up and used an <ol> instead.
I think I’ve tried building a combobox using datalist once but it didn’t work
As you learn more about “raw” html you find all sorts of very fun things that are - ah - not very well implemented if at all.
The neat thing about HTML is that it's a living standard and anyone can contribute. Old bugs get corrected all the time simply because it annoyed a certain person enough for them to push a fix through the standards process.

Unfortunately, it could be around a decade before all three major browsers finally implement the standard, and the fix might not be quite as clean as you originally imagined.

The reason is that there are lots of webpage authors, lots of pages that use old standards and very few browser implementations. That made the browsers carry the burden of making it all work right for everyone.
Case in point: the keygen element.