-
Notifications
You must be signed in to change notification settings - Fork 6k
[macOS] Fix IME input issue caused on FlutterTextInputPlugin dealloc. #31879
[macOS] Fix IME input issue caused on FlutterTextInputPlugin dealloc. #31879
Conversation
|
I believe this is an accurate fix. Specifically, the documentation for deactivate states that |
|
I spotted this when I was while working on #31849 recently (where I avoided calling that method) and was going to send a PR that removes existing I do think we should keep the call to clear the mark region though. If we're ending editing, we almost certainly don't want the mark text floating around. |
cbracken
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for sending this PR! I'll give some thought as to how we could test this.
|
From PR review triage: Ping @cbracken |
|
cc @cbracken. If you don't have the cycles to comment on a test strategy, can you provide guidance instead of if this is a sound fix? If this improves things, we can land this and file a followup issue to figure out testing such changes. |
cbracken
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
|
@chinmaygarde I don't have a great idea of how we could test this with our current test setup, but adding IME testing is something I'm looking at for Win/Mac/Linux. I've filed an issue that points back to this patch. flutter/flutter#102101 |
|
This pull request is not suitable for automatic merging in its current state.
|
zhongwuzw
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
|
This pull request is not suitable for automatic merging in its current state.
|
|
This pull request is not suitable for automatic merging in its current state.
|
|
@zhongwuzw I've rebased this commit to latest main branch and made the CI checks pass. |

This PR fixes an issue causing native textView not accepting text input caused by unnecessary NSTextInputContext calls on FlutterTextInputPlugin dealloc.
Fixes: flutter/flutter#99695
Pre-launch Checklist
writing and running engine tests.
///).If you need help, consider asking for advice on the #hackers-new channel on Discord.