JetBrains / compose-multiplatform

Compose Multiplatform, a modern UI framework for Kotlin that makes building performant and beautiful user interfaces easy and enjoyable.
https://jetbrains.com/lp/compose-multiplatform
Apache License 2.0
15.24k stars 1.11k forks source link

SelectionContainer crashed when right click space area #4985

Open Yricky opened 1 week ago

Yricky commented 1 week ago

Describe the bug See 'To Reproduce' Affected platforms

Versions

To Reproduce Steps to reproduce the behavior:

  1. Run this code snippet:
    @Composable
    fun BugReproduction() {
        SelectionContainer {
            Text("aaaa",Modifier.background(androidx.compose.ui.graphics.Color.White).padding(40.dp))
        }
    }
  2. Right click on space area
  3. See error

Expected behavior No action instead of crash occuring

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

截屏2024-06-17 16 18 35 截屏2024-06-17 16 14 12

Additional context Add any other context about the problem here.