Fix content rect calculation in SelectionManager #1270
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Proposed Changes
Cherry-picked from androidx
Fix a typo in
SelectionManager.getContentRect()
that results in an invalid rect being calculated, causing text toolbar to not show under certain conditions.Fixes: b/332782845
Test: manual
Change-Id: I153b99f4146d870182af2898d9a675ed6ffa15e4
Testing
Test: Open test app, go Components -> Selection, try to select text in selection container
Issues Fixed
Fixes: appearing of editing menu in selection container in wrong position
https://youtrack.jetbrains.com/issue/COMPOSE-1190/iOS-Selection-Container-cant-show-options-menu
JetBrains/compose-multiplatform#4322
b/332782845 in Google
Google CLA
You need to sign the Google Contributor’s License Agreement at https://cla.developers.google.com/.
This is needed since we synchronise most of the code with Google’s AOSP repository. Signing this agreement allows us to synchronise code from your Pull Requests as well.