about summary refs log tree commit diff
path: root/src/screens/Messages/Conversation/MessageInput.tsx
diff options
context:
space:
mode:
authorHailey <me@haileyok.com>2024-05-19 19:25:49 -0700
committerGitHub <noreply@github.com>2024-05-19 19:25:49 -0700
commit52beb29a0d96d8de731400aa654ca4c905c2aa48 (patch)
tree35c4807da520d9f9acb2247036018576c87dbe97 /src/screens/Messages/Conversation/MessageInput.tsx
parent7de0b0a58cf173e5e341b515c8b960c48c659ec3 (diff)
downloadvoidsky-52beb29a0d96d8de731400aa654ca4c905c2aa48.tar.zst
[🐴] Fully implement keyboard controller (#4106)
* Revert "[🐴] Ensure keyboard gets dismissed when leaving screen (#4104)"

This reverts commit 3ca671d9aacb6137e10e2cf3cd9bc170af798389.

* getting somewhere

* remove some now nuneeded code

* fully implement keyboard controller

* onStartReached check

* fix new messages pill alignment

* scroll to end on press

* simplify pill scroll logic

* update comment

* adjust logic on when to hide the pill

* fix backgrounding jank

* improve look of deleting messages

* add double tap on messages

* better onStartReached logic

* nit

* add hit slop to the gesture

* better gestures for press and hold

* nits
Diffstat (limited to 'src/screens/Messages/Conversation/MessageInput.tsx')
-rw-r--r--src/screens/Messages/Conversation/MessageInput.tsx3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/screens/Messages/Conversation/MessageInput.tsx b/src/screens/Messages/Conversation/MessageInput.tsx
index 9deecfd49..1e33efdf6 100644
--- a/src/screens/Messages/Conversation/MessageInput.tsx
+++ b/src/screens/Messages/Conversation/MessageInput.tsx
@@ -58,6 +58,9 @@ export function MessageInput({
     onSendMessage(message.trimEnd())
     playHaptic()
     setMessage('')
+
+    // Pressing the send button causes the text input to lose focus, so we need to
+    // re-focus it after sending
     setTimeout(() => {
       inputRef.current?.focus()
     }, 100)