We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8cb89f5 commit 6c2cee7Copy full SHA for 6c2cee7
compose/ui/ui/src/webCommonW3C/kotlin/androidx/compose/ui/platform/BackingDomInput.kt
@@ -54,8 +54,14 @@ internal class BackingDomInput(
54
}
55
56
fun focus() {
57
+ // we focus twice to be sure that ios and non-ios browser both manage to focus
58
+ // see https://youtrack.jetbrains.com/issue/CMP-8013
59
+ // and https://youtrack.jetbrains.com/issue/CMP-7836/
60
+ backingElement.focus()
61
window.requestAnimationFrame {
- backingElement.focus()
62
+ if (document.activeElement != backingElement) {
63
64
+ }
65
66
67
0 commit comments