about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorHailey <me@haileyok.com>2024-05-23 13:08:12 -0700
committerGitHub <noreply@github.com>2024-05-23 13:08:12 -0700
commit5c2e99e3e6fcbc6dc5bf4f123201086558eaa047 (patch)
tree8928a19c3d4d5440eee572edc43aa611d86fe9da /src
parentaf20229b41bd2dedbbd52ce77b6366a09f751c7b (diff)
downloadvoidsky-5c2e99e3e6fcbc6dc5bf4f123201086558eaa047.tar.zst
[🐴] Fix Firefox send button positioning (#4201)
* use `align_center`

* revert

* account for firefox textarea size differences

set to `38`

remove some extra stuff

equal height on all platforms

* use atom
Diffstat (limited to 'src')
-rw-r--r--src/screens/Messages/Conversation/MessageInput.web.tsx6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/screens/Messages/Conversation/MessageInput.web.tsx b/src/screens/Messages/Conversation/MessageInput.web.tsx
index 78292b066..ab3d227b4 100644
--- a/src/screens/Messages/Conversation/MessageInput.web.tsx
+++ b/src/screens/Messages/Conversation/MessageInput.web.tsx
@@ -30,6 +30,7 @@ export function MessageInput({
   const isComposing = React.useRef(false)
   const [isFocused, setIsFocused] = React.useState(false)
   const [isHovered, setIsHovered] = React.useState(false)
+  const [textAreaHeight, setTextAreaHeight] = React.useState(38)
 
   const onSubmit = React.useCallback(() => {
     if (message.trim() === '') {
@@ -92,11 +93,12 @@ export function MessageInput({
           a.flex_row,
           t.atoms.bg_contrast_25,
           {
-            paddingHorizontal: a.p_sm.padding - 2,
+            paddingRight: a.p_sm.padding - 2,
             paddingLeft: a.p_md.padding - 2,
             borderWidth: 1,
             borderRadius: 23,
             borderColor: 'transparent',
+            height: textAreaHeight + 23,
           },
           isHovered && inputStyles.chromeHover,
           isFocused && inputStyles.chromeFocus,
@@ -112,7 +114,6 @@ export function MessageInput({
             t.atoms.text,
             {
               paddingTop: 10,
-              paddingBottom: 12,
               backgroundColor: 'transparent',
               resize: 'none',
             },
@@ -131,6 +132,7 @@ export function MessageInput({
           onCompositionEnd={() => {
             isComposing.current = false
           }}
+          onHeightChange={height => setTextAreaHeight(height)}
           onChange={onChange}
           onKeyDown={onKeyDown}
         />