Browser autocomplete suggestions prompt, generated from datalist, show twice.
Vue version
3.2.47
Link to minimal reproduction
Steps to reproduce
- Click on the input labelled 'Bug Issue'.
- The browser should show 3 autocomplete suggestions from the associated datalist.
- Select one of the options.
- After selecting the option the autocomplete suggestion will show up again with the value just selected.
What is expected?
After selecting an autocomplete suggestion the box should close and be used as the inputs value.
What is actually happening?
After selecting an autocomplete suggestion the value is used as the inputs value but the autocomplete dropdown shows again.
System Info
System:
OS: Windows 10 10.0.19045
CPU: (12) x64 Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz
Memory: 10.77 GB / 31.84 GB
Binaries:
Node: 14.17.4 - C:\Program Files\nodejs\node.EXE
npm: 6.14.14 - C:\Program Files\nodejs\npm.CMD
Browsers:
Edge: Spartan (44.19041.1266.0), Chromium (112.0.1722.68)
Internet Explorer: 11.0.19041.1566
Any additional comments?
- Only affects Chrome (Tested Chrome / Firefox, Safari untested).
- Works as expected if the datalist is statically generated (with or without v-model).
- Works as expected if the datalist is dynamically generated (but no v-model directive).
- Error only seems to happen if the datalist options are generated from a v-for and the associated input uses a v-model directive.
- Maybe just a Chrome related issue (Datalists implementations have been known to be buggy in the past).