Open hisaichi5518 opened 2 years ago
AFAIK, this is the default behavior, not sure if there's a way to change that.
Hey,
AFAIK, this is the default behavior, not sure if there's a way to change that.
Indeed here two of the input sources are focused, so pressing enter will submit both form.
Using the mouse to select the Japanese text shouldn't trigger the search (which is expected), but I don't think there's a fix to that 🤔
Thank you for your reply.
Using the mouse to select the Japanese text shouldn't trigger the search (which is expected), but I don't think there's a fix to that 🤔
Yes, if I select the Japanese text with the mouse the search will not be executed.
We can use KeyboardEvent.isComposing
to change it so that pressing enter will not search when the input is not finalized.
The KeyboardEvent.isComposing
returns true when the input is not finalized.
https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/isComposing
I think we could check isComposing here: https://github.com/algolia/autocomplete/blob/next/packages/autocomplete-core/src/onKeyDown.ts#L108
I did not know about this option! It indeed looks like it should be fixed at the AC level, good catch
Reopening this issue to let the docsearch team handle updating autocomplete and forwarding ignoreCompositionEvents
.
Description
Pressing Enter when the text input is not finalized will take you to the document.
Steps to reproduce
Live reproduction:
Expected behavior
Environment