Character in chinese requires multi keystroke. And the IME won't be even triggered when you are not focusing a text field, render the whole function useless.
So, a common pattern here is "use combobox instead". Because combobox has a working input field build-in, make it usable with chinese.
But.... the HTML don't have combobox build-in, so you end up get one in literally any ui framework or a handwritten one if you really don't want to use framework.
Yes, it does. Supported in browsers since 2010, specified earlier. You have not taken the time to research this topic.
<input list="administrative_areas" name="PRC_AA" />
<datalist id="administrative_areas">
<option value="华北">
<option value="东北">
<option value="华东">
<option value="中南">
<option value="西北">
<option value="西南">
</datalist>
Type `南` to test.It is some what a replacement on chrome, because chrome decide to show it with arrow point to bottom.
And in both firefox and chrome. It don't even have a indicator display by default to tell you "you are supposed to select it, not type it" or "Type yourself is invalid, you need to use predefined options".
Just use normal components. Save the effort, help the screen reader, please the power user. Please.
Edit: Never mind, there is no way to open a <select> with JS.
edit: some quick googling reveals there is an API for this https://www.electronjs.org/docs/latest/api/menu#class-menu