Quote:
Originally Posted by Old Pedant
Well, yeah, but what is the fun in using somebody else's code? If I can't write it, why should I use it? <grin/>
|
because something like this stops being fun about half-way to production-level quality.
it's not so hard to get the textbox bound to a <select> instead of <datalist>, since they both use options, but that's where it stops being easy.
inside the textbox, you have to handle the arrow keys and selection/focus as expected without sacking accessibility. that must work on mac and windows, ie and chrome, which are all variations.
then you have to position the suggestion combo under the focused textbox, not always simple when float or position:fixed is in effect and don't forget about zooming/orientation changing the x/y offset between uses.
then you figure out that IOS doesn't do multi-line <select>s, and now you have to write a custom <div> replacement, and all the keyboard-accessible focus/navigation handlers. for all those browser variations.