Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

First character is lowercase if typing quickly after sending a message on WhatsApp or similar apps #994

Open
pudup opened this issue Jul 20, 2024 · 9 comments
Labels
bug Something isn't working

Comments

@pudup
Copy link

pudup commented Jul 20, 2024

Describe the bug

If you send a message on a messaging app, signal or WhatsApp, and then immediately start typing after it sends, the first character will be lowercase. Works fine if delayed slightly.

To Reproduce

Send any message
Start typing as soon as possible after sending

Expected behavior

New line has a capital first character

App version
2.1

Device:

  • Model: Moto G android 13
@pudup pudup added the bug Something isn't working label Jul 20, 2024
@pudup
Copy link
Author

pudup commented Jul 20, 2024

Seems similar to #664

@Helium314
Copy link
Owner

Possibly there is some delay in the text field forwarding the update (clearing text or changed cursor position) to the keyboard.

Does this happen anywhere else? I'd prefer having a way of reproducing this without having to install / register WhatsApp.

@pudup
Copy link
Author

pudup commented Jul 24, 2024

Happens in Discord Signal Telegram

Any messaging app as far as I've tested
Provided the app allows you to type quickly enough after sending a message

@Helium314
Copy link
Owner

I was only able to reproduce this a single time, but not when logging necessary stuff in debug mode...

Anyway, the selection update from clearing the text and related (correct) shift update happens before restarting the input. Sometimes the input connection (to the text field) is lost, maybe that's related to your problem. Could be that the key press event is processed and shift is disabled, but the event / input doesn't make it to the text field due to no connection.

@pudup
Copy link
Author

pudup commented Jul 25, 2024

It's very easily reproducible for me. Of note, it doesn't happen with other keyboards.

@pudup
Copy link
Author

pudup commented Jul 25, 2024

screen-20240725-153710.mp4

Here's a demo, with another keyboard at end (floris)

@Helium314
Copy link
Owner

It's very easily reproducible for me. Of note, it doesn't happen with other keyboards.

I managed to reliably reproduce it with a modified input field, and it does happen in a bunch of keyboards. Of the ones I tested, only Gboard and FlorisBoard did not have this issue.

@pudup
Copy link
Author

pudup commented Jan 5, 2025

Well FlorisBoard wuz the only other I tested. The point of it was taking away blame from the app for the bug.

@Helium314
Copy link
Owner

The fix caused other more frequent issues, so I have to revert it.

How to reproduce: have an input field that clears the text e.g. when the text contains \n, then type some text, trigger the clearing and immediately press another key.
What's going on: the last key press happens before the release of the previous key (triggering the clearing) is processed. So the key that's pressed actually is the lowercase variant. By the time the key is released, the uppercase variant is in the same place, but not updated in PointerTracker. Simply re-checking what key is in this place introduced #1268 and #1281.

@Helium314 Helium314 reopened this Jan 12, 2025
Helium314 added a commit that referenced this issue Jan 12, 2025
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants