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 17 hidden trackpad doesn't work in the TextFields (hold space bar and swipe to move cursor) #4593

Closed
OSemenovBoyarka opened this issue Apr 9, 2024 · 2 comments · Fixed by JetBrains/compose-multiplatform-core#1312
Assignees
Labels
enhancement New feature or request input Touch, mouse, keyboard input related ios

Comments

@OSemenovBoyarka
Copy link

OSemenovBoyarka commented Apr 9, 2024

Describe the bug
The iOS 17 introduced hidden trackpad feature, when you can hold the spacebar and then move the cursor with the swipe on the keyboard.
This doesn't move the cursor in any TextField in Jetpack Compose Multiplatform.
Surprisingly - the same feature works fine on Android with the same code.

Affected platforms

  • iOS

Versions

  • Kotlin version*: 1.9.23
  • Compose Multiplatform version*: 1.6.1
  • OS version(s)* (required for Desktop and iOS issues): 17.2
  • OS architecture (x86 or arm64): arm64
  • Device (model or simulator for iOS issues): any iOS device or simulator

To Reproduce
Steps and/or the code snippet to reproduce the behavior:

  1. Add a simple text field to the multiplatform app:
@Composable
fun App() {
    MaterialTheme {
        var text by remember { mutableStateOf("") }
        TextField(
            modifier = Modifier.fillMaxWidth(),
            value = text,
            onValueChange = { text = it }
        )
    }
}
  1. Run the app on either iOS 17 device or iOS 17 simulator
  2. Enter something in the text field
  3. Hold the space bar on the soft keyboard and move finger while holding it

Expected behavior
Cursor should move in the direction finger moves. Actually - cursor stays in place.

Screenshots
iOS simulator, how it actually works:
https://github.com/JetBrains/compose-multiplatform/assets/6439273/de8baba4-0785-4bb8-905e-6cbb34f58957

The same app running on Android Emulator (API 34):
https://github.com/JetBrains/compose-multiplatform/assets/6439273/57c61cc2-2aa7-44c3-a4c1-3778b0a4c693

Additional context
This is the new feature in iOS 17 - https://www.cnet.com/tech/mobile/this-secret-ios-trackpad-makes-typing-on-your-iphone-so-much-easier/

@OSemenovBoyarka OSemenovBoyarka added bug Something isn't working submitted labels Apr 9, 2024
@m-sasha
Copy link
Contributor

m-sasha commented Apr 9, 2024

@mazunin-v-jb Are we working on this?

@m-sasha m-sasha added enhancement New feature or request input Touch, mouse, keyboard input related ios and removed bug Something isn't working submitted labels Apr 9, 2024
@mazunin-v-jb
Copy link
Contributor

Yes, we're planning to support that but not in the nearest future.

@mazunin-v-jb mazunin-v-jb self-assigned this Apr 9, 2024
mazunin-v-jb pushed a commit to JetBrains/compose-multiplatform-core that referenced this issue Jun 3, 2024
## Proposed Changes

Initial iOS floating cursor support.


https://github.com/JetBrains/compose-multiplatform-core/assets/63979218/1c6681dc-5295-4712-80e0-f08f58f4687e


## Testing

Test: hold space bar and move the cursor

## Issues Fixed

Fixes: JetBrains/compose-multiplatform#4593

Co-authored-by: Andrei Salavei <Andrei.Salavei@jetbrains.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request input Touch, mouse, keyboard input related ios
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants