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

[Web/Wasm] TextField not opening keyboard in mobile browser #4836

Closed
Not-Soti opened this issue May 19, 2024 · 1 comment
Closed

[Web/Wasm] TextField not opening keyboard in mobile browser #4836

Not-Soti opened this issue May 19, 2024 · 1 comment
Assignees
Labels
bug Something isn't working web

Comments

@Not-Soti
Copy link

Not-Soti commented May 19, 2024

Describe the bug
Given a Compose Web app with a TextField, if it is accessed through a browser using a mobile phone, clicking on a text field does not open the software keyboard.
The TextField is receiving the focus as the labelmoves to the top side.

Affected platforms

  • Web (K/Wasm) - Canvas based API - Accesing with a mobile device

Versions

  • Compose Multiplatform version: 1.6.6
  • Kotlin version: 1.9.23
  • Device (model or simulator for iOS issues): Nothing Phone - Google Chrome App

To Reproduce
Steps to reproduce the behavior:

  1. Download a new project using the Compose Multiplatform Wizard
  2. Set the App() content to this:
@Composable
fun App() {
    MaterialTheme {
        var input by remember { mutableStateOf("") }
        Box(
            Modifier.fillMaxSize(),
            contentAlignment = Alignment.Center
        ){
            TextField(
                modifier = Modifier,
                value = input,
                label = { Text("Label") },
                onValueChange = { input = it }
            )
        }
    }
}
  1. Run the "wasmJsBrowserRun" gradle task, or other related local deployment task.
  2. Enter the web through a browser using a smart phone
  3. Click on the TextField

Expected behavior
The software keyboard should be displayed.

Screenshots
If applicable, add screenshots to help explain your problem.
image

Additional context
Add any other context about the problem here.

@Not-Soti Not-Soti added bug Something isn't working submitted labels May 19, 2024
@eymar eymar self-assigned this May 21, 2024
@eymar eymar added web and removed submitted labels May 21, 2024
@eymar
Copy link
Collaborator

eymar commented May 21, 2024

It was implemented in 1.6.10. Please give it a try.

@eymar eymar closed this as completed May 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working web
Projects
None yet
Development

No branches or pull requests

2 participants