Helium314 / HeliBoard

Customizable and privacy-conscious open-source keyboard
Apache License 2.0
2.3k stars 89 forks source link

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

Open pudup opened 2 months ago

pudup commented 2 months ago

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:

pudup commented 2 months ago

Seems similar to #664

Helium314 commented 2 months ago

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 commented 2 months ago

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 commented 2 months ago

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 commented 2 months ago

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

pudup commented 2 months ago

https://github.com/user-attachments/assets/23db265f-00cc-4cb3-9f92-53def826c1c7

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