-
Notifications
You must be signed in to change notification settings - Fork 6k
[macos] Move TextInputPlugin outside of visible area #39031
Conversation
This comment was marked as off-topic.
This comment was marked as off-topic.
@Hixie, does this need a test? |
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.
@knopp Thanks for the quick fix here, I really appreciate it! LGTM with a test or a test exemption.
You'll have better luck getting ahold of Hixie on Discord for a test exemption. Or, is it possible to test this? I didn't see anything in the NSTextView docs about getting the frame, but I'm not super familiar with AppKit.
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 fixing! Please add a test so we don't regress this.
You should be able to create a newly initialised plugin, then check NSIsEmptyRect(plugin.frame.size)
in a new test in shell/platform/darwin/macos/framework/Source/FlutterTextInputPluginTest.mm
So, the original comment says that the This PR fixed it by moving it out of visible area, while still keeping the Hoever I played with this a bit, I made the |
@chunhtai, any chance you remember why non-empty rect was needed? I tried this with empty rect and everything seems to work just fine (including IME + voiceover). It is possible that the difference before and now is that the plugin is now in view hierarchy (it wasn't originally)/ I'm inclined to go with empty rect since it seems cleaner. Test added. |
@chunhtai is out for couple weeks; should be back in early Feb I believe. If the empty rect works, I agree we should go with that. Was there any info in the commit comment or (since our infra was removing commit comments other than the first line, for a while) linked GitHub PR/Issue? |
…119299) * 789a549f4 [macos] Move TextInputPlugin outside of visible area (flutter/engine#39031) * e17f58747 Revert "[macos] Move TextInputPlugin outside of visible area (#39031)" (flutter/engine#39176) * a63d98feb Update buildroot to abada33. (flutter/engine#39173)
TextInputPlugin must be visible and in view hierarchy for emoji picker to work. This is trivial change that moves it completely outside of visible area.
Fixes flutter/flutter#118504
If you had to change anything in the flutter/tests repo, include a link to the migration guide as per the breaking change policy.
Pre-launch Checklist
///
).If you need help, consider asking for advice on the #hackers-new channel on Discord.