-
Notifications
You must be signed in to change notification settings - Fork 85
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
CfW: Fix Clipboard events handling for BasicTextField2 #1795
Conversation
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.
Discussed whether we should may be return empty String instead of null in the family of functions introduced (for collapsed text) otherwise don't see anything to object against.
@@ -294,6 +294,14 @@ internal fun BasicTextField( | |||
val currentClipboardManager = LocalClipboardManager.current | |||
val currentTextToolbar = LocalTextToolbar.current | |||
val autofillManager = LocalAutofillManager.current | |||
|
|||
rememberClipboardEventsHandler( |
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.
Should we do it in AOSP first? Do we have YT item to upstream it later?
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.
Add a comment in the code
https://youtrack.jetbrains.com/issue/CMP-7517/Upstream-rememberClipboardEventsHandler
2e095a2
to
f09d355
Compare
This change doesn't affect desktop target (the actual implementation of a new internal method is NoOp), so the failing tests can't be related to the change. Therefore, I'm merging this PR despite the failing desktop tests (the failing tests are about lifecycle - not related to BTF2). |
Fixes CMP-7435
Release Notes
Fixes - Web
BasicTextField
handles browser copy/cut/paste events correctly now. Previously, they were ignored.