Eliminating inconsistencies between BTF1, BTF2 and native iOS tap behavior#3229
Merged
Vladimir Mazunin (mazunin-v-jb) merged 1 commit intoJul 22, 2026
Conversation
Vladimir Mazunin (mazunin-v-jb)
requested review from
Andrei Salavei (ASalavei) and
Vendula Švastalová (svastven)
July 14, 2026 15:03
Vladimir Mazunin (mazunin-v-jb)
marked this pull request as draft
July 15, 2026 12:19
Vladimir Mazunin (mazunin-v-jb)
force-pushed
the
v.mazunin/CMP-10493-inconsistent-focus-behavior-between-BTFs
branch
from
July 16, 2026 13:42
41b1c07 to
3418d7b
Compare
Vladimir Mazunin (mazunin-v-jb)
force-pushed
the
v.mazunin/CMP-10493-inconsistent-focus-behavior-between-BTFs
branch
from
July 20, 2026 20:51
f489359 to
1f877ee
Compare
…t snapshot and adjust caret focusing behavior BTF1: snap caret on focusing tap and show context menu only when the caret doesn't move Removed redundant comment in `TextFieldSelectionState.ios.kt` and reverted caret behavior documentation in `TextFieldDelegate.skiko.kt`. Adjusted context menu appearing behavior in BTF1 to BTF2 Aligned context menu appearing behavior in case when tap occurs on the unfocused textfield which was previously focused (BTF2) Reverted BTF2 changes, aligned BTF1 caret by tap behavior to the BTF2 Refactor `determineCursorDesiredOffset` to simplify parameters (previous offset is not needed) and update related tests Made tap focus behavior in BTF2 consistent with BTF1 and Native iOS behavior
Vladimir Mazunin (mazunin-v-jb)
force-pushed
the
v.mazunin/CMP-10493-inconsistent-focus-behavior-between-BTFs
branch
from
July 20, 2026 20:54
1f877ee to
a005f2f
Compare
Vladimir Mazunin (mazunin-v-jb)
marked this pull request as ready for review
July 20, 2026 21:18
| } | ||
|
|
||
| @Test | ||
| fun determineCursorDesiredOffset_tap_on_the_caret_at_the_same_position() { |
There was a problem hiding this comment.
This test checked the incorrect logic (tap on the caret in the middle of the word doesn't snap the caret to word boundaries), so I had to change it
Andrei Salavei (ASalavei)
approved these changes
Jul 21, 2026
Vendula Švastalová (svastven)
approved these changes
Jul 21, 2026
Vlad Konstantinov (Kpotko)
self-requested a review
July 22, 2026 14:58
Vlad Konstantinov (Kpotko)
approved these changes
Jul 22, 2026
Vladimir Mazunin (mazunin-v-jb)
deleted the
v.mazunin/CMP-10493-inconsistent-focus-behavior-between-BTFs
branch
July 22, 2026 15:00
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.
Aligns tap/caret/context-menu behavior across
BasicTextField(TextFieldValue)(BTF1),BasicTextField(TextFieldState)(BTF2) and native iOS.Fixes:
https://youtrack.jetbrains.com/issue/CMP-10493
What has been aligned
BTF1 tap handling
cupertinoSetCursorOffsetFocused) now runs on every tap outside selection, including the focusing tapContext menu on tap (BTF1 + BTF2)
iOS edit-menu freshness
Select/Select Allgating reads the current selection instead of a value the snapshot flow lagged behind on (fixedSelectwrongly appearing after a double-tap word selection).Testing
Manual. This should be tested by QA
Release Notes
Fixes - iOS
BasicTextField(TextFieldValue)BasicTextField(TextFieldValue)andBasicTextField(TextFieldState)