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

iOS TextField, Incorrect behavior of text selection by double tap #2682

Closed
etolstoy opened this issue Jan 31, 2023 · 1 comment
Closed

iOS TextField, Incorrect behavior of text selection by double tap #2682

etolstoy opened this issue Jan 31, 2023 · 1 comment
Assignees
Labels
bug Something isn't working ios

Comments

@etolstoy
Copy link
Contributor

etolstoy commented Jan 31, 2023

SCR-20230131-htk

There are some bugs in text selection in `TextField` on iOS Simulator in the `widgets-gallery` sample:
  • The selection overlay layout is broken
  • The selection doesn't appear on a double-click on a text as in native apps
  • Double tap on a string of emojis selects nothing, but should select a single emoji

Simulator: iOS 16.2, iPhone 14

Moved ContextMenu related bugs to issue: #3276

@dima-avdeev-jb dima-avdeev-jb self-assigned this Jan 31, 2023
@dima-avdeev-jb dima-avdeev-jb added ios bug Something isn't working labels Jan 31, 2023
dima-avdeev-jb added a commit to JetBrains/compose-multiplatform-core that referenced this issue Feb 1, 2023
dima-avdeev-jb added a commit to JetBrains/compose-multiplatform-core that referenced this issue Feb 2, 2023
eymar pushed a commit to JetBrains/compose-multiplatform-core that referenced this issue Feb 24, 2023
MatkovIvan pushed a commit to MatkovIvan/compose-multiplatform that referenced this issue May 10, 2023
Selection handlers
And Context Menu (JetBrains#2682)
@dima-avdeev-jb dima-avdeev-jb changed the title Incorrect behavior of text selection and context menu in TextField on iOS simulator Incorrect behavior of text selection in TextField on iOS simulator Jun 19, 2023
@dima-avdeev-jb dima-avdeev-jb changed the title Incorrect behavior of text selection in TextField on iOS simulator iOS Incorrect behavior of text selection in TextField on simulator Jun 19, 2023
@dima-avdeev-jb dima-avdeev-jb changed the title iOS Incorrect behavior of text selection in TextField on simulator iOS TextField, Incorrect behavior of text selection on simulator Jun 19, 2023
@mazunin-v-jb mazunin-v-jb self-assigned this Aug 24, 2023
@mazunin-v-jb
Copy link
Contributor

mazunin-v-jb commented Aug 24, 2023

Selection overlay layout should be re-checked, I guess It has already fixed
image
Left: native Reminders app
Right: compose-multiplatform-core example app

Problems with double tap selection of the text and emoji still reproduce, I'm working on a fix for it.

@mazunin-v-jb mazunin-v-jb changed the title iOS TextField, Incorrect behavior of text selection on simulator iOS TextField, Incorrect behavior of text selection by double tap Sep 13, 2023
igordmn added a commit to JetBrains/compose-multiplatform-core that referenced this issue Nov 15, 2023
…textfields on iOS (#831)

## Proposed Changes

Added UIKitTapGesturesDetector.kt - repeating tap gestures detector.
Moved and separated the logic for handling taps in the textfields.
Added handling of double and triple taps in the textfields on iOS.

This PR also includes review fixes from [my previous, closed
one](#798)

## Testing

Test: Open any screen with textfield with mutable text, then try to
double or triple tap on text (or if its empty, write something in it).
Try to test with focused textfield and unfocused.
Double tap selects the word, triple tap selects the paragraph.

## Issues Fixed

JetBrains/compose-multiplatform#2682

https://youtrack.jetbrains.com/issue/COMPOSE-333/iOS-TextField-Incorrect-behavior-of-text-selection-by-double-tap
(YT double version of the previous issue)

https://youtrack.jetbrains.com/issue/COMPOSE-409/iOS-TextField-support-triple-tap-handle

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

---------

Co-authored-by: dima.avdeev <dima.avdeev@jetbrains.com>
Co-authored-by: Igor Demin <igordmn@users.noreply.github.com>
igordmn added a commit to JetBrains/compose-multiplatform-core that referenced this issue Nov 16, 2023
…tap gesture handling in textfields on iOS (#831)

## Proposed Changes

Added UIKitTapGesturesDetector.kt - repeating tap gestures detector.
Moved and separated the logic for handling taps in the textfields.
Added handling of double and triple taps in the textfields on iOS.

This PR also includes review fixes from [my previous, closed
one](#798)

## Testing

Test: Open any screen with textfield with mutable text, then try to
double or triple tap on text (or if its empty, write something in it).
Try to test with focused textfield and unfocused.
Double tap selects the word, triple tap selects the paragraph.

## Issues Fixed

JetBrains/compose-multiplatform#2682

https://youtrack.jetbrains.com/issue/COMPOSE-333/iOS-TextField-Incorrect-behavior-of-text-selection-by-double-tap
(YT double version of the previous issue)

https://youtrack.jetbrains.com/issue/COMPOSE-409/iOS-TextField-support-triple-tap-handle

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

---------

Co-authored-by: dima.avdeev <dima.avdeev@jetbrains.com>
Co-authored-by: Igor Demin <igordmn@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working ios
Projects
None yet
Development

No branches or pull requests

3 participants