vuejs / vitepress

Vite & Vue powered static site generator.
https://vitepress.dev
MIT License
12.83k stars 2.08k forks source link

algolia搜索框在输入关键字时会中断输入法拼写 #3604

Open lichaozhy opened 7 months ago

lichaozhy commented 7 months ago

Describe the bug

这个情况从中文用户使用中发现,也可能广泛存在于非英语键盘的用户中。输入关键字过程中,尝试给出的结果会中断拼写。

Reproduction

  1. 进入Vitrepress文档首页 https://vitepress.dev/zh/
  2. 触发打开搜索框
  3. 使用“微软输入法”并尝试缓慢输入复用,即按顺序输入f-u-y-o-n-g

Expected behavior

希望能够顺畅的完成关键字输入

System Info

System:
    OS: Windows 10 10.0.22631
    CPU: (16) x64 AMD Ryzen 7 6800H with Radeon Graphics
    Memory: 44.07 GB / 63.18 GB
  Binaries:
    Node: 20.10.0 - C:\Program Files\nodejs\node.EXE
    npm: 10.2.5 - C:\Program Files\nodejs\npm.CMD
  Browsers:
    Edge: Chromium (121.0.2277.128)
    Internet Explorer: 11.0.22621.1
  npmPackages:
    vitepress: 1.0.0-rc.44 => 1.0.0-rc.44

Additional context

No response

Validations

awxiaoxian2020 commented 7 months ago

我这边没有复现,可以上传视频吗?

lichaozhy commented 7 months ago

我应当进一步补充前提。是在Firefox中出现的。

https://github.com/vuejs/vitepress/assets/6188255/0d621ff3-9e92-45dc-aad8-0f24c1079071

brc-dd commented 7 months ago

Can you check if that input method is working fine on https://docsearch.algolia.com/ ? If not then there is not much we can do here.

lichaozhy commented 7 months ago

Yes. There are still issues on algolia.com. thx

brc-dd commented 7 months ago

Also can you try searching something in Chinese on https://unocss.dev/ ? Is the input method working fine there? It's using local search. Also, is this happening only on Firefox? Can you confirm it's working fine on Chrome/Edge?

lichaozhy commented 7 months ago

https://unocss.dev/ is OK. The search behavior is dispatched after the input is completely finished.

lichaozhy commented 7 months ago

There is no problem on chrome/edge. This may be a problem with Firefox.

brc-dd commented 7 months ago

Ah right. Got it. It's same as this issue - https://github.com/algolia/docsearch/issues/1304

lichaozhy commented 7 months ago

It is about CompositionEvent.