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.59k stars 1.14k forks source link

`SelectionContainer` can't show options menu on iOS #4322

Closed robxyy closed 1 month ago

robxyy commented 5 months ago

Describe the bug SelectionContainer can't show options menu on iOS

Affected platforms Select one of the platforms below:

Versions

To Reproduce

When long pressing SelectionContainer, the options menu can't be shown , like Copy ...

SelectionContainer {
  Text(text = "Hello World!")
}

Expected behavior

Show options menu like Android

Screenshots

bonamanada commented 5 months ago

It is not reproduced in version 1.6.0-alpha01, but is reproduced starting from version 1.6.0-beta01.

MatkovIvan commented 5 months ago

@bonamanada jfyi 1.6.0-alpha01 is 1.5.x + WASM, it doesn't contain actual 1.6 changes

brendanw commented 4 months ago

@dima-avdeev-jb @mazunin-v-jb I am seeing this on compose 1.6.1 -- this is a pretty serious regression. Is there an ETA for a fix?

mazunin-v-jb commented 3 months ago

Should be included in the next release (1.6.10)

brendanw commented 3 months ago

@mazunin-v-jb I just tested 1.6.10-beta01 and still seeing the issue fwiw.

mazunin-v-jb commented 3 months ago

@brendanw beta01 doesn't contain that fix, please wait for the beta02

robxyy commented 3 months ago

@mazunin-v-jb beta2 has fixed this issue, but there are still two issues:

  1. When using SelectionContainer with Text, the keyboard will be shown

    SelectionContainer {
    Text(text = "Hello World!")
    }
  2. When using SelectionContainer with Column or Row, scrolling Column leads to the selected text cursor being lost

    Column(Modifier.fillMaxSize().verticalScroll(rememberScrollState())) {
    SelectionContainer {
    Text(
      text = (0..300).fold("") { text, _ ->
        text + "Hello World!"
      },
    )
    }
    }
brendanw commented 3 months ago

I am also seeing the same two issues as @robxyy on beta02

mazunin-v-jb commented 1 month ago

@robxyy Thanks for describing problems! Since these two problems are not related to options menu, I decided to move them out into separate issues: (iOS) Selection Container shows keyboard while selecting text and Dragging to scroll clears selection.