Steps to replicate the issue (include links if applicable):
- Install a Chinese IME (pinyin is used below)
- Open Chinese Wikipedia (this also happens at least in Commons)
- Click the search box near the logo, and type some Chinese words
- e.g. "上海中心大厦", first type "上海" (shanghai), then "中心" (zhongxin), then "大厦" (dasha)
- This bug only happens when the words are typed (not pasted).
What happens?:
When the Chinese IME is active, only the current candidate text is sent in /w/rest.php/v1/search/title?q=%s requests. The text before it is ignored.
For "上海""中心""大厦", when "中心" is typed, the suggestions are based on word "中心".
Both Vector 2022 and Minerva are affected. The issue mainly affects Chrome. With Firefox, only the candidate text is sent during IME composition, but the full query is correctly sent after the IME exits.
What should have happened instead?:
The full input box content should be used for search suggestion regardless of IME usage. A change in TypeaheadSearch (gerrit #1217251) might have caused this regression.
https://domeventviewer.com/key-event-viewer.html might be of help in visualizing the DOM events.
Software version: 1.46.0-wmf.14
Other information:
- Browser: Chrome 145 / Windows 10
- IME: Microsoft Pinyin



