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
16.15k stars 1.17k forks source link

[JS, Canvas] Some composables like `Button` with externally defined `shape` argument cause crash when shape is `RoundedCornerShape` with one or more zero corners #3013

Closed alexzhirkevich closed 1 year ago

alexzhirkevich commented 1 year ago

BottomSheetScaffold causes crash when sheetShape is RoundedCornerShape with one or more zero corners

EDIT: not only scaffold. Some other composables like Button with externally defined shape argument also causes crash

Affected platforms

Versions

To Reproduce


fun App() {
    onWasmReady {
        Window {
            BottomSheetScaffold(
                sheetContent = {
                    Text("Content")
                },
                sheetShape = RoundedCornerShape(10.dp, 10.dp, 10.dp, 0.dp)
            ) {

            }
        }
    }
}

Screenshots

image
alexzhirkevich commented 1 year ago

Still reproduces in 1.4.0-rc03

dima-avdeev-jb commented 1 year ago

Reproduced this crash on PR: https://github.com/JetBrains/compose-multiplatform-core/pull/503

okushnikov commented 3 months ago

Please check the following ticket on YouTrack for follow-ups to this issue. GitHub issues will be closed in the coming weeks.