Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] <SearchField /> trigger onSubmit when pressing Enter is used for completing IME #6421

Closed
ktabors opened this issue May 20, 2024 Discussed in #6332 · 1 comment
Closed

Comments

@ktabors
Copy link
Member

ktabors commented May 20, 2024

Discussed in #6332

Originally posted by QzCurious May 6, 2024
Though I use IME, but I only learned that it somehow relate to how I type/construct Chinese characters. I don't know it in any technical aspect.

It's recorded from official docs here. What I'm doing is:

  1. Click on <SearchField /> and ready for typing
  2. Switch IME for typing Chinese characters
  3. Start typing some primitives to construct the words "被送出"
  4. While I type, you can tell that I'm "constructing" by the underline
  5. Whenever I'm done constructing, I press "Enter" to construct/complete the words "被送出"
  6. The bug happened
Screen.Recording.2024-05-06.at.3.49.34.PM.mov

I though this behavior is caused by trigger onSubmit directly by keypress on "Enter" key (Have been discussed a bit on #5774 (comment)).

At this point, I'd like to argue again that instead of having a custom onSubmit implementation, not interrupting browser default behavior for "Enter on an input" might be a better approach .

@QzCurious
Copy link
Contributor

I didn't notice you create a issue for my discussion. I think you can close it as the bug already solved by #6404.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants