From f269f8b905cb8f433c35e1829b003900e7d3ed10 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Bosi?= <71827178+bosiraphael@users.noreply.github.com> Date: Fri, 21 Feb 2025 15:37:07 +0100 Subject: [PATCH] Fix autogrow input whitespace bug (#10388) Also fixed chip alignment. Before: https://github.com/user-attachments/assets/7bfe7c73-676a-4dee-b5df-fed15b663267 After: https://github.com/user-attachments/assets/9060b3cc-051b-41f7-8149-418ed1c223cb --- .../modules/command-menu/components/CommandMenuContextChip.tsx | 1 + .../src/utilities/dimensions/components/AutogrowWrapper.tsx | 1 + 2 files changed, 2 insertions(+) diff --git a/packages/twenty-front/src/modules/command-menu/components/CommandMenuContextChip.tsx b/packages/twenty-front/src/modules/command-menu/components/CommandMenuContextChip.tsx index bf203113c..d79860c4d 100644 --- a/packages/twenty-front/src/modules/command-menu/components/CommandMenuContextChip.tsx +++ b/packages/twenty-front/src/modules/command-menu/components/CommandMenuContextChip.tsx @@ -8,6 +8,7 @@ const StyledChip = styled.button<{ onClick?: () => void; }>` align-items: center; + justify-content: center; background: ${({ theme }) => theme.background.transparent.light}; border: 1px solid ${({ theme }) => theme.border.color.medium}; border-radius: ${({ theme }) => theme.border.radius.md}; diff --git a/packages/twenty-ui/src/utilities/dimensions/components/AutogrowWrapper.tsx b/packages/twenty-ui/src/utilities/dimensions/components/AutogrowWrapper.tsx index fef1b2d0c..d0cb380ce 100644 --- a/packages/twenty-ui/src/utilities/dimensions/components/AutogrowWrapper.tsx +++ b/packages/twenty-ui/src/utilities/dimensions/components/AutogrowWrapper.tsx @@ -10,6 +10,7 @@ type AutogrowWrapperProps = { const StyledNodeWrapper = styled.span` pointer-events: none; visibility: hidden; + white-space: pre; `; const StyledContainer = styled.div`