Skip to content

Commit 8cb89f5

Browse files
authored
In DesktopTextInputService, ignore call to stopInput() (#2032)
1 parent 0f88c22 commit 8cb89f5

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Diff for: compose/ui/ui/src/desktopMain/kotlin/androidx/compose/ui/platform/DesktopPlatformInput.desktop.kt

+4
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,10 @@ internal class DesktopTextInputService(private val component: PlatformComponent)
7676
}
7777

7878
override fun stopInput() {
79+
// We may have been "started" with startInput() (with no arguments), but it's not a real
80+
// session in this case, so let's not call component.disableInput()
81+
if (currentInput == null) return
82+
7983
component.disableInput()
8084
currentInput = null
8185
}

0 commit comments

Comments
 (0)