compose-multiplatform icon indicating copy to clipboard operation
compose-multiplatform copied to clipboard

`SelectionContainer` can't show options menu on iOS

Open robxyy opened this issue 1 year ago • 8 comments

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

Affected platforms Select one of the platforms below:

  • iOS

Versions

  • Kotlin version*: 1.9.22
  • Compose Multiplatform version*: 1.6.0-rc02

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

robxyy avatar Feb 17 '24 07:02 robxyy

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

bonamanada avatar Mar 01 '24 08:03 bonamanada

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

MatkovIvan avatar Mar 01 '24 08:03 MatkovIvan

@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?

brendanw avatar Mar 23 '24 02:03 brendanw

Should be included in the next release (1.6.10)

mazunin-v-jb avatar Apr 15 '24 14:04 mazunin-v-jb

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

brendanw avatar Apr 20 '24 14:04 brendanw

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

mazunin-v-jb avatar Apr 20 '24 14:04 mazunin-v-jb

@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!")
}
  1. 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!"
      },
    )
  }
}

robxyy avatar Apr 25 '24 16:04 robxyy

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

brendanw avatar Apr 26 '24 03:04 brendanw

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

mazunin-v-jb avatar Jun 17 '24 10:06 mazunin-v-jb