Anyone know why this works on Chrome but not on Sa...
# webassembly
m
Anyone know why this works on Chrome but not on Safari?
Copy code
val scope = rememberCoroutineScope()
val uriHandler = LocalUriHandler.current
Row(modifier = Modifier.fillMaxWidth(), horizontalArrangement = Arrangement.Center) {
    Button({
        scope.launch {
            viewModel.upgradeCommunity()?.let { url ->
                uriHandler.openUri(url)
            }
        }
    }) {
        Text("Subscribe")
    }
}
On Safari it won’t open the Url. I’ve checked that the url is correct
c
Not sure if that's what you're seeing, but in the past I have seen safari refuse to open links from code (popup protection I guess). Instead I replaced buttons by
<a>
tags so the browser knows it's the user's intent
1
m
You’re right. I disabled the pop-up blocker and it works now