Anyone have a problem with Button() on Safari? I'...
# webassembly
a
Anyone have a problem with Button() on Safari? I've got a webapp that's basically working across many browsers and other platforms, but on Safari it just stops responding with lots of JsExceptions on the console. I've basically narrowed it down to moving the mouse cursor rapidly between 2 or more Button()s. You really have to shake the cursor (if it goes big like you are trying to find it, that's the level of shaking I mean) to reproduce reliably. If I just swap out the Button with a Box(clickable {...}) { Text(...) } there is no problem! Also I've noticed that "imageviewer" and "jetsnack" don't use the standard Button (use IconButton)*.*
m
What’s the JavaScript console saying? Any exceptions or other error messages in the output? I also have a Wasm app which works without problems on Chrome and Firefox but throws exceptions on Safari.
c
when we had issues on safari with wasmjs, updating the browser to latest version fixed it
a
I'm on 18.5 (latest)
As I said above, the JsConsole is showing tons of exceptions in WASM (can't tell where). But I've isolated this into a dirt simple 10 LOC example; its Button, not my code.
Copy code
Column {
    Row(Modifier.fillMaxWidth()) {
        for (i in 1..3)
        {
            Button(onClick = { println(i) }, modifier = Modifier.wrapContentSize(Alignment.Center)) {
                Text(modifier = Modifier.padding(5.dp), text = "But $i")
            }
        }
    }
    Row(Modifier.fillMaxWidth()) {
        for (i in 1..3)
        {
            Box(modifier = Modifier.clickable { println(i) }.background(Color.Blue).wrapContentSize(Alignment.Center)) {
                Text(modifier = Modifier.padding(5.dp), text = "Box $i")
            }
        }
    }
}
Screen Recording 2025-08-13 at 4.52.20 PM.mov
compose 1.8.2, kotlin 2.2.20-Beta2
e
Hi! It's a known issue introduced in 2.2.20-Beta2 version and will be fixed in 2.2.20-RC Also works fine in 2.2.20-Beta1
1
🙌 1
m
@Chrys We always try with the latest versions and in our case we even tried the latest technology preview of Safari, but our problem seems to be unrelated to this one because it is a known issue which is fixed already.
👍 1