Skip to content

bug: input, textarea, select: layout shifts when error text appears #31030

Open

Description

@fudom

It would be great if we can keep the input-bottom.sc-ion-input-md element, even if the input is valid. Because 1. layout shifting and 2. missing border. Removing the element with border (which changes element size) removes the border and causes layout changes. And it would be great if we keep the space for the error text.

<ion-input
  label="Name"
  labelPlacement="floating"
  formControlName="name"
  errorText="Blah blah blah"
>
</ion-input>

Image

You can see that the layout shifts and in the end the border disappears.

Ionic v8, Angular v19, Chrome 146.0.7680.153

Workaround: Remove errorText and make your own by using control errors in element below and use ion-item in this case for the line or use css for this. I cannot reproduce this is stackblitz, but in a fresh new Angular project with same setup. No custom stuff. It's weird, but there is something wrong.

Activity

  1. added
    community feedback wanted
    and removed on Mar 23, 2026
  2. ionitron-bot commented on Mar 23, 2026

    @ionitron-bot

    This issue has been labeled as community feedback wanted. This label is added to issues that we would like to hear from the community on before moving forward with any final decision on the feature request.

    If the requested feature is something you would find useful for your applications, please react to the original post with 👍 (+1). If you would like to provide an additional use case for the feature, please post a comment.

    The team will review this feedback and make a final decision. Any decision will be posted on this thread, but please note that we may ultimately decide not to pursue this feature.

    Thank you!

  3. added and removed
    community feedback wanted
    on Nov 18, 2026
  4. changed the title [-]bug: Keep error text space to prevent layout shifting and keep border visible[/-] [+]bug: input, textarea, select: layout shifts when error text appears[/+] on Nov 21, 2026
  5. thetaPC commented on Nov 21, 2026

    @thetaPC
    Contributor

    Thanks for the report, and sorry for the delay.

    This happens on 9.0.12. When errorText is set without helperText, nothing holds the line under the input while the error is hidden, so the input grows by about 14px when the error appears. Material Design keeps that space reserved, so we're treating this as a bug. ion-textarea and ion-select shift the same way.

    The disappearing line has a separate cause: the line belongs to the helper and error text area, which is only rendered while errorText or helperText is set. If errorText is cleared once the control is valid, the area and its line are removed with it. Keep errorText set at all times instead, since the error is only shown once the input has ion-invalid and ion-touched, which Angular adds through form validation.

    Until it's fixed, this rule in global.scss reserves the space so the input keeps the same height:

    ion-input .input-bottom .helper-text {
      min-height: 1lh;
    }

    Tracked as a bug in core.

  6. added
    package: core
    type: bug
    on Nov 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    package: coretype: bug

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions