Skip to content

Commit

Permalink
fix: iOS focus bug
Browse files Browse the repository at this point in the history
  • Loading branch information
toshusai committed Feb 1, 2024
1 parent 08674e6 commit 8b57ea2
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions packages/react/src/components/TextField/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,7 @@ const StyledInputContainer = styled.div<{
hasPrefix: boolean
hasSuffix: boolean
}>`
position: relative;
display: grid;
grid-template-columns: ${(p) =>
[p.hasPrefix && 'auto', '1fr', p.hasSuffix && 'auto']
Expand Down Expand Up @@ -218,11 +219,14 @@ const SuffixContainer = styled.span`
const StyledInput = styled.input<{
invalid: boolean
}>`
position: absolute;
border: none;
box-sizing: border-box;
outline: none;
font-family: inherit;
left: 8px;
/* Prevent zooming for iOS Safari */
transform-origin: top left;
transform: scale(0.875);
Expand Down

0 comments on commit 8b57ea2

Please sign in to comment.