You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
When using TextField/BasicTextField with singleLine = false, I would expect to add new line on NumPadEnter press, but it doesn't. The behavior is different from when pressing normal enter or Swing JTextArea in general.
Affected platforms
Desktop
Versions
Kotlin version*: 1.9.20
Compose Multiplatform version*: 1.5.11 (also tried on 1.6.0-alpha01, the bug persists)
OS version: Windows 11
OS architecture: x86
JDK (for desktop issues): 17
To Reproduce
Run
fun main() = application {
Window(onCloseRequest = ::exitApplication) {
Column {
Row {
var textState by remember { mutableStateOf("") }
TextField(
value = textState,
onValueChange = { textState = it },
modifier = Modifier
.padding(start = 4.dp, end = 4.dp)
.fillMaxSize(),
singleLine = false,
)
}
}
}
}
Click into TextField.
Press NumPadEnter
See that no new line added.
Expected behavior
A new line added.
The text was updated successfully, but these errors were encountered:
## Proposed Changes
- Handle `NumPadEnter` as new line in text fields
## Testing
Test: use reproducer from the issue
## Issues Fixed
FixesJetBrains/compose-multiplatform#4109
Describe the bug
When using TextField/BasicTextField with singleLine = false, I would expect to add new line on NumPadEnter press, but it doesn't. The behavior is different from when pressing normal enter or Swing JTextArea in general.
Affected platforms
Versions
To Reproduce
Expected behavior
A new line added.
The text was updated successfully, but these errors were encountered: