How to access virtual keyboard suggestions with javascript the same way i could using a <datalist> in html

37 Views Asked by At

I have a rather compact static UI made in JS + Jquery/HTML/CSS.

I need to make a a text input with suggestions, which so far i succeeded however it misses one thing. That is the suggestions (or autocomplete) on phones, which could be done if i uses a <datalist> html tag.

I don't have any professional testing environment that would allow me to test on most browsers how my UI is rendered. Hence I'm using only <div> as I know they will render almost always the same on any browsers. Including not using <datalist> (note i may be wrong but i believe <datalist> is like <select> with a rendering a styling completely dependent on browsers especially because it relies on <options> tags which i already had trouble with and Apple products because <options> weren't rendering at all (and i don't own any Apple product to debug myself).

Therefore I thought of directly telling the keyboard maybe with the experimental VirtualKeyboard API but i couldn't find anything.

And i don't have any further guesses, if anyone has any idea, lead or advice then many thanks

0

There are 0 best solutions below