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

Message Input Field Not Cleared When Sending While Japanese IME Candidates Are Displayed #496

Closed
masarusanjp opened this issue May 28, 2024 · 5 comments
Assignees
Labels
bug Something isn't working

Comments

@masarusanjp
Copy link
Contributor

masarusanjp commented May 28, 2024

What did you do?

I attempted to send a message while Japanese conversion candidates were still being displayed.

What did you expect to happen?

I expected the message input field to be cleared after sending the message, even if Japanese conversion candidates were displayed.

What happened instead?

The message input field was not cleared after sending the message.

GetStream Environment

GetStream Chat version:: 4.56.1
GetStream Chat frameworks: StreamChatSwiftUI
iOS version: 17.4
Swift version: 5.9
Xcode version: 15.3
Device: iOS Simulator iPhone 15 Pro

Additional context

Simulator.Screen.Recording.-.iPhone.15.Pro.-.2024-05-29.at.06.52.29.mp4
@masarusanjp
Copy link
Contributor Author

When IME candidates are displayed, markedTextRange becomes non-nil, so it seems that assigning an empty string to InputTextView is not being executed.

https://github.com/GetStream/stream-chat-swiftui/blob/main/Sources/StreamChatSwiftUI/ChatChannel/Composer/ComposerTextInputView.swift#L46

This issue was resolved with the following fix, but sorry since I have not yet confirmed whether this fix causes any other issues, so I providing the diff for reference.

- if uiView.markedTextRange == nil {
+ if uiView.markedTextRange == nil || text.isEmpty {

@martinmitrevski
Copy link
Contributor

Hi @masarusanjp,

Thanks for reporting, we will have a look. @laevandus an interesting one for you 🇯🇵

@laevandus laevandus self-assigned this May 30, 2024
@laevandus laevandus added the bug Something isn't working label Jun 4, 2024
@laevandus
Copy link
Contributor

Hi @masarusanjp, I checked the proposed fix and we'll include it with the next release. Thank you!

@masarusanjp
Copy link
Contributor Author

Thank you for the quick response and for including the fix in the next release. I'm looking forward to it!

@laevandus
Copy link
Contributor

Hi @masarusanjp This issue is fixed in 4.58.0 Thank you for reporting!

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

3 participants