fix(app): stop composer height flicker

Native scrollbar appearance changed the textarea's usable width, feeding alternating measurements back into the composer height mirror. Reserve the gutter so wrapping and height remain stable.
This commit is contained in:
Mohamed Boudra
2026-07-15 12:04:53 +02:00
parent 5ddd5f3726
commit 4a5630bfce
2 changed files with 6 additions and 0 deletions

View File

@@ -74,6 +74,7 @@ import {
} from "./state";
const DEFAULT_SEND_KEYS: ShortcutKey[][] = [["Enter"]];
const COMPOSER_INPUT_DATASET = { composerInput: "" } as const;
export interface AttachmentMenuItem {
id: string;
@@ -1807,6 +1808,7 @@ export const MessageInput = forwardRef<MessageInputRef, MessageInputProps>(
<View style={styles.textInputScrollWrapper}>
<ThemedTextInput
ref={textInputRef}
dataSet={COMPOSER_INPUT_DATASET}
value={value}
onChangeText={handleInputChange}
placeholder={placeholder ?? t("composer.placeholders.fallback")}

View File

@@ -19,6 +19,10 @@ export function installWebScrollbarStyles(): () => void {
scrollbar-width: ${WEB_SCROLLBAR_WIDTH};
}
[data-composer-input] {
scrollbar-gutter: stable;
}
*::-webkit-scrollbar {
width: ${WEB_SCROLLBAR_SIZE_PX}px;
height: ${WEB_SCROLLBAR_SIZE_PX}px;