Removed caret snapping inside grapheme clusters hack#3049
Merged
Vladimir Mazunin (mazunin-v-jb) merged 7 commits intoJun 18, 2026
Merged
Conversation
723f706 to
4bb6028
Compare
Oleksandr Karpovich (eymar)
approved these changes
May 21, 2026
Oleksandr Karpovich (eymar)
left a comment
Member
There was a problem hiding this comment.
LGTM. I assume the tests will pass with the new skia/skiko.
Author
|
PR in skia is merged, waiting for the Skia merged here |
… because of moving this logic to Skia
4bb6028 to
3861d53
Compare
Follow-up to [the Skia/Skiko hit-testing fixes for caret positioning. ](JetBrains/skia#20) This PR must be merged after updating Skia. - Enabled three previously ignored tests. - Removed the workaround with the RTL block-position correction in `getOffsetForPosition` (the `correctedGlyphPosition -= 1` branch with the `isNeutralDirection` / `Direction.RTL` check). Skia should return the correct offset for clicks to the right of a line in mixed-direction text now, so the compose-side adjustment is no longer needed. - Adjusted and removed getOffsetForPosition_insideComplexCharacter_shouldJumpToEnd` → `getOffsetForPosition_midpointOfComplexCharacter_snapsToClusterStart`, since it's more accurate and conforms to the Android behavior. Fixes: [CMP-8594 Fix `Paragraph.getOffsetForPosition` behavour in corner cases](https://youtrack.jetbrains.com/issue/CMP-8594) ## Testing There are tests already, however, this better be tested by QA ## Release Notes N/A
Author
|
Hubert Błaszczyk (@hub-bla), |
Ivan Matkov (MatkovIvan)
approved these changes
Jun 18, 2026
da5e94d
into
jb-main
30 of 31 checks passed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
… because of moving this logic to our Skia fork
This should be merged after merging this PR to Skia, and merging updated Skia to the compose-multiplatform-core.
Technically, this is a revert of this PR excluding the tests.
Fixes:
CMP-8324 Move caret adjustments in complex glyphs fix to Skia
Testing
Autotests:
SkikoParagraphTest.getOffsetForPosition_insideComplexCharacter_shouldJumpToEndSkikoParagraphTest.getOffsetForPosition_endOfLineWithComplexCharacter_shouldPositionCorrectlyThis should be tested by QA.
Test case is here
Release Notes
N/A