singerdmx / flutter-quill

Rich text editor for Flutter
https://pub.dev/packages/flutter_quill
MIT License
2.6k stars 839 forks source link

Fix: Resolved issue with broken IME composing rect in Windows desktop(re-implementation) #2282

Closed agata closed 1 month ago

agata commented 1 month ago

Description

I have re-implemented the changes from #2239 that were previously reverted. In this implementation, when the ComposingRange has an invalid position, the position is no longer updated in TextInputConnection. During the composing phase, the correct ComposingRange is generally retrieved, and the display position is determined based on that information, so no issues occur. The exception that caused the revert has also been resolved. I have confirmed that this behavior works correctly across Windows, Mac, Web, iOS, and Android.

Before: https://github.com/user-attachments/assets/3afd158f-73f1-45ba-b56e-56ff4c9b965a

After: https://github.com/user-attachments/assets/e9246da5-6ed0-416d-b358-36bc83f74c62

Related Issues

Type of Change

Suggestions

EchoEllet commented 1 month ago

@singerdmx Can we review the changes before merging PRs as we discussed this in previous issues?