Skip to content
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

Merged
merged 2 commits into from
Feb 3, 2025

Conversation

eymar
Copy link
Member

@eymar eymar commented Jan 24, 2025

Fixes CMP-7435

Release Notes

Fixes - Web

  • The BasicTextField handles browser copy/cut/paste events correctly now. Previously, they were ignored.

@eymar eymar requested a review from Schahen January 24, 2025 12:31
@eymar eymar changed the title Fix Clipboard events handling for BasicTextField2 CfW: Fix Clipboard events handling for BasicTextField2 Jan 24, 2025
Copy link
Collaborator

@Schahen Schahen left a 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(
Copy link
Member

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?

Copy link
Member Author

@eymar eymar Feb 3, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@eymar eymar force-pushed the ok/cmp-7435-fix-btf2-clipboard-events branch from 2e095a2 to f09d355 Compare February 3, 2025 10:26
@eymar
Copy link
Member Author

eymar commented Feb 3, 2025

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).

@eymar eymar merged commit 9ba5947 into jb-main Feb 3, 2025
6 of 7 checks passed
@eymar eymar deleted the ok/cmp-7435-fix-btf2-clipboard-events branch February 3, 2025 16:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants