add isComposing to search (#4244)

This commit is contained in:
Addison
2026-05-08 18:47:20 +09:00
committed by GitHub
parent 56aeb19e49
commit 6ba5e54d19
3 changed files with 6 additions and 2 deletions
+5
View File
@@ -0,0 +1,5 @@
---
"gitbook": patch
---
Support isComposing for search
-1
View File
@@ -1,6 +1,5 @@
{
"lockfileVersion": 1,
"configVersion": 0,
"workspaces": {
"": {
"name": "gitbook",
@@ -81,7 +81,7 @@ function useSearchKeyboardNavigation(props: {
} else if (event.key === 'ArrowDown') {
event.preventDefault();
moveCursorBy(1);
} else if (event.key === 'Enter') {
} else if (event.key === 'Enter' && !event.nativeEvent.isComposing) {
event.preventDefault();
if (cursor !== null && cursor >= results.length) {
onAskSelect(cursor - results.length);