From a8749929e01b07043631fbc8c522d39cbc3ae798 Mon Sep 17 00:00:00 2001 From: Liam DeBeasi Date: Thu, 20 Apr 2023 11:57:56 -0400 Subject: [PATCH] fix(ios): scroll assist sizes input correctly (#27253) Issue number: resolves #27249 --------- ## What is the current behavior? The cloned input/textarea for scroll assist is not sized correctly. For legacy inputs, this causes the clone to be off by ~1px because it does not have the correct height. For modern inputs, this causes the same bug as the legacy inputs plus cloned inputs overlap any floating/stacked labels. This was not a concern for legacy inputs because those inputs did not contain the label element where modern inputs do. ## What is the new behavior? - Sets `bottom: 0` for cloned inputs so they have the correct height - Sets `position: relative` on the `.native-wrapper` so the cloned input does not flow outside of the parent container. **Before** | Modern Input | Legacy Input | | - | - | | | | (Note: The legacy input bug is subtle -- the input only shifts by ~1px) **After** | Modern Input | Legacy Input | | - | - | | | | ## Does this introduce a breaking change? - [ ] Yes - [x] No ## Other information --- core/src/components/input/input.scss | 4 +++- core/src/components/textarea/textarea.scss | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/core/src/components/input/input.scss b/core/src/components/input/input.scss index 42b882c572..26a6f9d501 100644 --- a/core/src/components/input/input.scss +++ b/core/src/components/input/input.scss @@ -177,7 +177,7 @@ // otherwise the .input-cover will not be rendered at all // The input cover is not clickable when the input is disabled .cloned-input { - @include position(0, null, null, 0); + @include position(0, null, 0, 0); position: absolute; @@ -307,6 +307,8 @@ .native-wrapper { display: flex; + position: relative; + flex-grow: 1; width: 100%; diff --git a/core/src/components/textarea/textarea.scss b/core/src/components/textarea/textarea.scss index ffc0c5f51a..f7ae9fe3e1 100644 --- a/core/src/components/textarea/textarea.scss +++ b/core/src/components/textarea/textarea.scss @@ -190,7 +190,7 @@ // otherwise the .input-cover will not be rendered at all // The input cover is not clickable when the input is disabled .cloned-input { - @include position(0, null, null, 0); + @include position(0, null, 0, 0); position: absolute; @@ -269,6 +269,8 @@ .native-wrapper { display: flex; + position: relative; + flex-grow: 1; width: 100%;