-
Notifications
You must be signed in to change notification settings - Fork 28.7k
Clear _scribbleCacheKey when connection closes #122145
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
Conversation
fbfca25
to
5927d4c
Compare
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. Thanks for the fix!
5927d4c
to
236c7bb
Compare
Clear _scribbleCacheKey when connection closes
Noob question: Is the connection created every time a text input is focused? @moffatman |
@hellohuanlin It might be, not actually sure. This fixes the issue observed when you tested in the |
^ @LongCatIsLooong i'm wondering if you have context on question? Thanks! |
Yeah whenever an input field gains focus it creates a connection. |
When a TextInputConnection is recreated in the engine, it won't have its previous selectionRects remembered. But the framework still thinks it does, as
_scribbleCacheKey
isn't changed. The effect of this is that when refocusing a text field, the selectionRects will be missing until the text is changed. By clearing the cache-key, they will be properly re-sent when the TextInputConnection is re-opened.Part of #30476
Pre-launch Checklist
///
).