-
Notifications
You must be signed in to change notification settings - Fork 63
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[web] Process keydown and keyup keys for identified keys from virtual keyboard #1380
Conversation
compose/ui/ui/src/webCommonW3C/kotlin/androidx/compose/ui/platform/BackingTextArea.kt
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm thinking about a test which can be added here:
- the test would send a touch event to make our internal state (keyboardModeState) switch to
KeyboardModeState.Virtual
(a tap on the TextField) - it would send Keyboard events into the textarea
- it would check that Modifier.onKeyEvent receives the events
What do you think?
d209826
to
531339c
Compare
@@ -52,7 +52,7 @@ class SelectionContainerTests : OnCanvasTests { | |||
fun setup() { | |||
// Because AfterTest is fixed only in kotlin 2.0 | |||
// https://youtrack.jetbrains.com/issue/KT-61888 | |||
document.getElementById(canvasId)?.remove() | |||
commonAfterTest() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The tests here failed on CI.
Could this change be a reason of the test failure?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
although locally all the tests pass. weird :(
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tried to rerun the CI, but same failure.
for some reason I think commonAfterTest
might be a reason.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let me just return everything as it was and see how it goes
the reason might be parallelization or whatever
This fixes some issues with pressing some virtual keys that don't change the input value - like navigation with arrows.
Also, this will make finally possible to switch to KeybardEvent::key-backed toComposeEvent conversion