Skip to content
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

Text cursor keeps blinking after hiding keyboard, on Android #1097

Open
gnprice opened this issue Dec 4, 2024 · 1 comment
Open

Text cursor keeps blinking after hiding keyboard, on Android #1097

gnprice opened this issue Dec 4, 2024 · 1 comment
Labels
a-compose Compose box, autocomplete, attaching files/images a-msglist The message-list screen, except what's label:a-content
Milestone

Comments

@gnprice
Copy link
Member

gnprice commented Dec 4, 2024

Repro:

  • On Android, visit a message list that has a compose box.
  • Touch the content input to focus it. A blinking cursor will appear, as will the keyboard.
  • Dismiss the keyboard using either (a) the "back" gesture or button or (b) the keyboard's own button for being dismissed.
  • The keyboard will vanish, making room again for the full height of the message list.
  • Expected: The blinking cursor will also vanish.
  • Actual: The cursor keeps blinking.

In particular there doesn't seem to be any way to get the cursor to stop blinking, short of exiting the page entirely.

The reason the cursor keeps blinking is that the text field is still focused. This is one of several symptoms of that fact; the others (#1098, #1100) are less common but can be much more annoying. This symptom and the others might or might not get fixed by the same commit, depending on how we fix them.

A workaround we don't intend to use would be to pass ScrollViewKeyboardDismissBehavior.onDrag to the message list's scroll view, so that trying to scroll causes the keyboard to vanish and the text input to lose focus. See reasoning in chat.

@gnprice gnprice added a-msglist The message-list screen, except what's label:a-content a-compose Compose box, autocomplete, attaching files/images labels Dec 4, 2024
@gnprice gnprice added this to the M7: Future milestone Dec 4, 2024
@gnprice
Copy link
Member Author

gnprice commented Dec 4, 2024

I'm not sure this behavior is something we'll actually want to change.

  • There are real use cases for dismissing the on-screen keyboard while keeping focus in a text field: the user may be planning to edit the text some other way, for example with a physical keyboard. A "fix" for this issue might disrupt those use cases.
  • Other apps vary in their behavior here. In particular both Slack and FB Messenger have the same behavior we currently have as far as this issue is concerned, though Discord has the alternate behavior this issue asks for. See Keyboard can pop up on returning from lightbox or internal link #1100 (comment) .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
a-compose Compose box, autocomplete, attaching files/images a-msglist The message-list screen, except what's label:a-content
Projects
Status: No status
Development

No branches or pull requests

1 participant