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] MacOS 下 Safari 中使用中文输入法时回车 #4297

Closed
1 of 3 tasks
freejool opened this issue Mar 14, 2024 · 16 comments
Closed
1 of 3 tasks

[Bug] MacOS 下 Safari 中使用中文输入法时回车 #4297

freejool opened this issue Mar 14, 2024 · 16 comments
Labels
bug Something isn't working

Comments

@freejool
Copy link

Bug Description

MacOS 下 Safari 中使用中文输入法输入一些字符,此时输入的字符以英文输入输入框后立即被发送,而不是仅输入输入框
同设备下Chrome无此问题

Steps to Reproduce

  1. 将发送键设置为Enter
  2. 切换到中文输入法
  3. 输入一些字符
  4. 按一次回车
  5. 输入的字符以英文输入输入框后立即被发送

Expected Behavior

字符仅输入输入框,不被发送

Screenshots

No response

Deployment Method

  • Docker
  • Vercel
  • Server

Desktop OS

MacOS 14.4

Desktop Browser

Safari

Desktop Browser Version

17.4

Smartphone Device

No response

Smartphone OS

No response

Smartphone Browser

No response

Smartphone Browser Version

No response

Additional Logs

No response

@freejool freejool added the bug Something isn't working label Mar 14, 2024
@Issues-translate-bot
Copy link

Bot detected the issue body's language is not English, translate it automatically.


Title: [Bug] Press Enter when using the Chinese input method in Safari under MacOS

@hanxiao790
Copy link

Mac 版桌面 App 也是这个问题,不得不切换成了 Ctrl + Enter 来发送

@Issues-translate-bot
Copy link

Bot detected the issue body's language is not English, translate it automatically.


The Mac version of the desktop app also has this problem, and I have to switch to Ctrl + Enter to send

@iTvX
Copy link

iTvX commented Mar 14, 2024

mac下safari测试也有这个问题,但是chromium类型的浏览器就没有这个问题

@Issues-translate-bot
Copy link

Bot detected the issue body's language is not English, translate it automatically.


Safari testing under mac also has this problem, but chromium-type browsers do not have this problem

@fred-bf
Copy link
Contributor

fred-bf commented Mar 15, 2024

I've tested it and can't reproduce it. Can you provide the specific input content to reproduce the issue?

@chongiscool
Copy link

我设置成 shift + enter 发送,暂时能满足

@Issues-translate-bot
Copy link

Bot detected the issue body's language is not English, translate it automatically.


I set it to shift + enter to send, which is enough for the time being.

@freejool
Copy link
Author

I've tested it and can't reproduce it. Can you provide the specific input content to reproduce the issue?

actually anything

@imraax
Copy link
Contributor

imraax commented Mar 18, 2024

I've tested it and can't reproduce it. Can you provide the specific input content to reproduce the issue?

On MacOS, Tauri uses the Safari kernel by default, and Safari's event.isComposing is always false, and only keyCode is used to determine whether it is an input method state.

@imraax
Copy link
Contributor

imraax commented Mar 18, 2024

可以参考我的commit,加一行keyCode判断。这是非直接输入法在Safari中的React.CompositionEvent<HTMLTextAreaElement> 事件判断回车和空格等功能键为flase产生的Bug。

@fred-bf
Copy link
Contributor

fred-bf commented Mar 19, 2024

Merged, @freejool would you mind check whether the issue still exists again

@freejool
Copy link
Author

freejool commented Mar 20, 2024

@fred-bf I don't know if I'm doing right.

Your build has completed!

Preview deployment

I checked the build in #4322, and it's not fixed.

My service is deployed in docker and I believe the fix is not released as docker img.

@imraax
Copy link
Contributor

imraax commented Mar 20, 2024

@fred-bf I don't know if I'm doing right.

Your build has completed!
Preview deployment

I checked the build in #4322, and it's not fixed.

My service is deployed in docker and I believe the fix is not released as docker img.

@freejool I think so, I found that build still have the bug, you can check my new build https://chat-gpt-next-web-git-main-raaxs-projects.vercel.app

@imraax
Copy link
Contributor

imraax commented Mar 20, 2024

@freejool I found the preview of deployments,Preview

@freejool
Copy link
Author

@freejool I found the preview of deployments,Preview

Yeah, this build is working fine, Cheers!🍻🍻

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

7 participants