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.
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
2264
2239
Type of Change
Suggestions